diff options
author | David Malcolm <dmalcolm@redhat.com> | 2010-02-23 11:00:24 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2010-02-23 11:00:24 -0500 |
commit | 33067f32c1243b9cf580de798db38defc98bd3a9 (patch) | |
tree | 011c1f0f9ed80b87c8d26f3e970073aa3231da13 | |
parent | 49a93802d2013a79f1c63f948c5c781be04fc928 (diff) | |
download | libpython-33067f32c1243b9cf580de798db38defc98bd3a9.tar.gz libpython-33067f32c1243b9cf580de798db38defc98bd3a9.tar.xz libpython-33067f32c1243b9cf580de798db38defc98bd3a9.zip |
Verify that gdb was built with embedded python
-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): |