summaryrefslogtreecommitdiffstats
path: root/test_gdb.py
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2010-02-23 11:00:24 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2010-02-23 11:00:24 -0500
commit33067f32c1243b9cf580de798db38defc98bd3a9 (patch)
tree011c1f0f9ed80b87c8d26f3e970073aa3231da13 /test_gdb.py
parent49a93802d2013a79f1c63f948c5c781be04fc928 (diff)
downloadlibpython-33067f32c1243b9cf580de798db38defc98bd3a9.tar.gz
libpython-33067f32c1243b9cf580de798db38defc98bd3a9.tar.xz
libpython-33067f32c1243b9cf580de798db38defc98bd3a9.zip
Verify that gdb was built with embedded python
Diffstat (limited to 'test_gdb.py')
-rw-r--r--test_gdb.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test_gdb.py b/test_gdb.py
index ee60461..127f19a 100644
--- a/test_gdb.py
+++ b/test_gdb.py
@@ -23,7 +23,13 @@ if int(gdb_version_number.group(1)) < 7:
raise TestSkipped("gdb versions before 7.0 didn't support python embedding."
" Saw:\n" + gdb_version)
-# TODO: handle gdb 7 configured without python support
+# Verify that "gdb" was built with the embedded python support enabled:
+p = subprocess.Popen(["gdb", "--batch",
+ "--eval-command=python import sys; print sys.version_info"],
+ stdout=subprocess.PIPE)
+gdbpy_version, _ = p.communicate()
+if gdbpy_version == '':
+ raise TestSkipped("gdb not built with embedded python support")
class DebuggerTests(unittest.TestCase):