diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py index dbcb5983e9ba1d..434ce8643729be 100644 --- a/Lib/test/test_gdb.py +++ b/Lib/test/test_gdb.py @@ -33,7 +33,8 @@ def get_gdb_version(): # 'GNU gdb (GDB) Fedora 7.9.1-17.fc22\n' -> 7.9 # 'GNU gdb 6.1.1 [FreeBSD]\n' -> 6.1 # 'GNU gdb (GDB) Fedora (7.5.1-37.fc18)\n' -> 7.5 - match = re.search(r"^GNU gdb.*?\b(\d+)\.(\d+)", version) + # 'HP gdb 6.7 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.\n' -> 6.7 + match = re.search(r"^(?:GNU|HP) gdb.*?\b(\d+)\.(\d+)", version) if match is None: raise Exception("unable to parse GDB version: %r" % version) return (version, int(match.group(1)), int(match.group(2))) diff --git a/Misc/NEWS.d/next/Tests/2018-08-20-09-38-52.bpo-34401.eGxMPm.rst b/Misc/NEWS.d/next/Tests/2018-08-20-09-38-52.bpo-34401.eGxMPm.rst new file mode 100644 index 00000000000000..1b28d94c056d45 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2018-08-20-09-38-52.bpo-34401.eGxMPm.rst @@ -0,0 +1 @@ +Make test_gdb properly run on HP-UX. Patch by Michael Osipov.