public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][testsuite/guality] Be verbose about gdb version used
@ 2018-06-22 11:35 Tom de Vries
  2018-06-22 16:01 ` Jeff Law
  0 siblings, 1 reply; 8+ messages in thread
From: Tom de Vries @ 2018-06-22 11:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: Mike Stump, Rainer Orth

Hi,

by default, guality invokes gdb with --quiet to avoid being unnecessarily
verbose for each test.  But as a consequence, we don't see which version of
gdb is used.

This patch adds printing of the full path to the gdb used, as well as the
gdb version as printed by gdb.

Tested on x86_64.

OK for trunk?

Thanks,
- Tom

[testsuite/guality] Be verbose about gdb version used

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.

---
 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 ++++++++++
 4 files changed, 13 insertions(+)

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"
+}

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-06-25 16:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22 11:35 [PATCH][testsuite/guality] Be verbose about gdb version used Tom de Vries
2018-06-22 16:01 ` Jeff Law
2018-06-23 17:06   ` Christophe Lyon
2018-06-23 23:47     ` Tom de Vries
2018-06-25 12:32       ` Andreas Schwab
2018-06-25 13:18         ` Tom de Vries
2018-06-25 14:36           ` Andreas Schwab
2018-06-25 16:02             ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).