Commit bf515867 by Tom de Vries Committed by Tom de Vries

[testsuite/guality] Fix tcl error on missing gdb

2018-06-24  Tom de Vries  <tdevries@suse.de>

	* g++.dg/guality/guality.exp: Don't use which on gdb arg to report_gdb.
	* gcc.dg/guality/guality.exp: Same.
	* gfortran.dg/guality/guality.exp: Same.
	* lib/gcc-gdb-test.exp: Do early out if which gdb fails.

From-SVN: r261988
parent be68f3fa
2018-06-24 Tom de Vries <tdevries@suse.de>
* g++.dg/guality/guality.exp: Don't use which on gdb arg to report_gdb.
* gcc.dg/guality/guality.exp: Same.
* gfortran.dg/guality/guality.exp: Same.
* lib/gcc-gdb-test.exp: Do early out if which gdb fails.
2018-06-23 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/concepts/locations1.C: New.
......
......@@ -46,7 +46,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]
report_gdb $::env(GUALITY_GDB_NAME) [info script]
if {[check_guality "
#include \"$srcdir/$subdir/guality.h\"
......
......@@ -46,7 +46,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]
report_gdb $::env(GUALITY_GDB_NAME) [info script]
if {[check_guality "
#include \"$srcdir/$subdir/guality.h\"
......
......@@ -27,7 +27,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]
report_gdb $::env(GUALITY_GDB_NAME) [info script]
gfortran-dg-runtest [lsort [glob $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] "" ""
......
......@@ -145,6 +145,11 @@ proc gdb-test { args } {
# Argument 1 is the location where gdb is used
#
proc report_gdb { gdb loc } {
if { [catch { exec which $gdb } msg] } {
send_log "gdb not found in $loc: $msg\n"
return
}
set gdb [exec which $gdb]
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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment