diff options
-rw-r--r-- | test_gdb.py | 8 |
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): |