summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-09-02 13:44:22 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-09-02 13:44:22 (GMT)
commit6dad8f89623e588f486d069b7a336c1430c3c147 (patch)
tree6bc3b01b0b0c43f4b8e9837c79b3c025f9f3c2e8
parent1101c5873706b69d687400939e50b07af13ec8a0 (diff)
downloadcpython-6dad8f89623e588f486d069b7a336c1430c3c147.zip
cpython-6dad8f89623e588f486d069b7a336c1430c3c147.tar.gz
cpython-6dad8f89623e588f486d069b7a336c1430c3c147.tar.bz2
test_gdb: add debug info to investigate failure on "s390x SLES 3.x" buildbot
-rw-r--r--Lib/test/test_gdb.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index 0322677..193c97a 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -28,9 +28,13 @@ except OSError:
# This is what "no gdb" looks like. There may, however, be other
# errors that manifest this way too.
raise unittest.SkipTest("Couldn't find gdb on the path")
-gdb_version_number = re.search(b"^GNU gdb [^\d]*(\d+)\.(\d)", gdb_version)
-gdb_major_version = int(gdb_version_number.group(1))
-gdb_minor_version = int(gdb_version_number.group(2))
+try:
+ gdb_version_number = re.search(b"^GNU gdb [^\d]*(\d+)\.(\d)", gdb_version)
+ gdb_major_version = int(gdb_version_number.group(1))
+ gdb_minor_version = int(gdb_version_number.group(2))
+except Exception:
+ raise ValueError("unable to parse GDB version: %r" % gdb_version)
+
if gdb_major_version < 7:
raise unittest.SkipTest("gdb versions before 7.0 didn't support python embedding"
" Saw:\n" + gdb_version.decode('ascii', 'replace'))