test_gdb: dump gdb version in verbose mode

This commit is contained in:
Antoine Pitrou 2013-09-21 23:56:17 +02:00
parent 0ce1953bf7
commit d0f3e07a60

View file

@ -5,6 +5,7 @@
import os import os
import re import re
import pprint
import subprocess import subprocess
import sys import sys
import sysconfig import sysconfig
@ -17,6 +18,7 @@
except ImportError: except ImportError:
_thread = None _thread = None
from test import support
from test.support import run_unittest, findfile, python_is_optimized from test.support import run_unittest, findfile, python_is_optimized
try: try:
@ -837,6 +839,10 @@ def test_locals_after_up(self):
r".*\na = 1\nb = 2\nc = 3\n.*") r".*\na = 1\nb = 2\nc = 3\n.*")
def test_main(): def test_main():
if support.verbose:
print("GDB version:")
for line in os.fsdecode(gdb_version).splitlines():
print(" " * 4 + line)
run_unittest(PrettyPrintTests, run_unittest(PrettyPrintTests,
PyListTests, PyListTests,
StackNavigationTests, StackNavigationTests,