summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gdb.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-05-06 11:03:05 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-05-06 11:03:05 (GMT)
commitf1b34ee61bfadd5684566823f1f439c086ef7f55 (patch)
tree35c434967b34c6295f91eed3daad8a539a475fb9 /Lib/test/test_gdb.py
parent73954040f6b9459e59803fd62af14c547a7b3636 (diff)
downloadcpython-f1b34ee61bfadd5684566823f1f439c086ef7f55.zip
cpython-f1b34ee61bfadd5684566823f1f439c086ef7f55.tar.gz
cpython-f1b34ee61bfadd5684566823f1f439c086ef7f55.tar.bz2
#12660: Skip test_gdb when run from an installed Python.
Diffstat (limited to 'Lib/test/test_gdb.py')
-rw-r--r--Lib/test/test_gdb.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index c4c4803..91543c6 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -7,6 +7,7 @@ import os
import re
import subprocess
import sys
+import sysconfig
import unittest
import locale
@@ -24,6 +25,9 @@ if int(gdb_version_number.group(1)) < 7:
raise unittest.SkipTest("gdb versions before 7.0 didn't support python embedding"
" Saw:\n" + gdb_version.decode('ascii', 'replace'))
+if not sysconfig.is_python_build():
+ raise unittest.SkipTest("test_gdb only works on source builds at the moment.")
+
# Verify that "gdb" was built with the embedded python support enabled:
cmd = "--eval-command=python import sys; print sys.version_info"
p = subprocess.Popen(["gdb", "--batch", cmd],