]> granicus.if.org Git - python/commitdiff
test_gdb: dump gdb version in verbose mode
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 21 Sep 2013 21:56:17 +0000 (23:56 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 21 Sep 2013 21:56:17 +0000 (23:56 +0200)
Lib/test/test_gdb.py

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