[testsuite/guality] Be verbose about gdb version used
authorTom de Vries <tdevries@suse.de>
Fri, 22 Jun 2018 19:50:03 +0000 (19:50 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Fri, 22 Jun 2018 19:50:03 +0000 (19:50 +0000)
2018-06-22  Tom de Vries  <tdevries@suse.de>

* lib/gcc-gdb-test.exp (report_gdb): New proc.
* g++.dg/guality/guality.exp: Use report_gdb.
* gcc.dg/guality/guality.exp: Same.
* gfortran.dg/guality/guality.exp: Same.

From-SVN: r261911

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/guality/guality.exp
gcc/testsuite/gcc.dg/guality/guality.exp
gcc/testsuite/gfortran.dg/guality/guality.exp
gcc/testsuite/lib/gcc-gdb-test.exp

index d86ac84d424d1a3252ae33dcf46251ad5bc7bab2..320fdac341b0906dbc1e96de726ac1baa0a18507 100644 (file)
@@ -1,3 +1,10 @@
+2018-06-22  Tom de Vries  <tdevries@suse.de>
+
+       * lib/gcc-gdb-test.exp (report_gdb): New proc.
+       * g++.dg/guality/guality.exp: Use report_gdb.
+       * gcc.dg/guality/guality.exp: Same.
+       * gfortran.dg/guality/guality.exp: Same.
+
 2018-06-22  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/85662
index 5bffd9df1a04d2c5088bf4dcefb2cc833ec4e496..72f23c8cca727c011b2122875253b4cac5406391 100644 (file)
@@ -43,6 +43,7 @@ if ![info exists ::env(GUALITY_GDB_NAME)] {
     }
     setenv GUALITY_GDB_NAME "$guality_gdb_name"
 }
+report_gdb [exec which $::env(GUALITY_GDB_NAME)] [info script]
 
 if {[check_guality "
   #include \"$srcdir/$subdir/guality.h\"
index d2b863397bae78db107c06e8928b5a31e853295f..7eebd27b544cab2c025fb742008dde0356e37154 100644 (file)
@@ -43,6 +43,7 @@ if ![info exists ::env(GUALITY_GDB_NAME)] {
     }
     setenv GUALITY_GDB_NAME "$guality_gdb_name"
 }
+report_gdb [exec which $::env(GUALITY_GDB_NAME)] [info script]
 
 if {[check_guality "
   #include \"$srcdir/$subdir/guality.h\"
index 3f96a04bd26fd4b19468f42e128faeeac370fdcc..62875fd54b8ab4e21c6b2fcb2862d867e632dd5d 100644 (file)
@@ -24,6 +24,7 @@ if ![info exists ::env(GUALITY_GDB_NAME)] {
     }
     setenv GUALITY_GDB_NAME "$guality_gdb_name"
 }
+report_gdb [exec which $::env(GUALITY_GDB_NAME)] [info script]
 
 gfortran-dg-runtest [lsort [glob $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] "" ""
 
index 0c4d2a533f625968475b8175c644cc1c9af3feb3..f3726635c038351b883f95fa351b3218b9e34571 100644 (file)
@@ -139,3 +139,13 @@ proc gdb-test { args } {
     file delete $cmd_file
     return
 }
+
+# Report the gdb path and version log the .log file
+# Argument 0 is the gdb path
+# Argument 1 is the location where gdb is used
+# 
+proc report_gdb { gdb loc } {
+    send_log "gdb used in $loc: $gdb\n"
+    set gdb_version [exec $gdb -v]
+    send_log "gdb used in $loc: version:\n---\n$gdb_version\n---\n"
+}