From be56f2c4730a3d28389f7ff757fb3b7137bd2e57 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 22 Jun 2018 19:50:03 +0000 Subject: [PATCH] [testsuite/guality] Be verbose about gdb version used 2018-06-22 Tom de Vries * 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 | 7 +++++++ gcc/testsuite/g++.dg/guality/guality.exp | 1 + gcc/testsuite/gcc.dg/guality/guality.exp | 1 + gcc/testsuite/gfortran.dg/guality/guality.exp | 1 + gcc/testsuite/lib/gcc-gdb-test.exp | 10 ++++++++++ 5 files changed, 20 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d86ac84d424..320fdac341b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2018-06-22 Tom de Vries + + * 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 PR c++/85662 diff --git a/gcc/testsuite/g++.dg/guality/guality.exp b/gcc/testsuite/g++.dg/guality/guality.exp index 5bffd9df1a0..72f23c8cca7 100644 --- a/gcc/testsuite/g++.dg/guality/guality.exp +++ b/gcc/testsuite/g++.dg/guality/guality.exp @@ -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\" diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp index d2b863397ba..7eebd27b544 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.exp +++ b/gcc/testsuite/gcc.dg/guality/guality.exp @@ -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\" diff --git a/gcc/testsuite/gfortran.dg/guality/guality.exp b/gcc/testsuite/gfortran.dg/guality/guality.exp index 3f96a04bd26..62875fd54b8 100644 --- a/gcc/testsuite/gfortran.dg/guality/guality.exp +++ b/gcc/testsuite/gfortran.dg/guality/guality.exp @@ -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} ]] "" "" diff --git a/gcc/testsuite/lib/gcc-gdb-test.exp b/gcc/testsuite/lib/gcc-gdb-test.exp index 0c4d2a533f6..f3726635c03 100644 --- a/gcc/testsuite/lib/gcc-gdb-test.exp +++ b/gcc/testsuite/lib/gcc-gdb-test.exp @@ -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" +} -- 2.30.2