Commit 9f4a318c by Zack Weinberg

libstdc++.exp (dg-test): Annotate result messages with $which_library as well as $tool_flags and...

	* testsuite/lib/libstdc++.exp (dg-test): Annotate result
	messages with $which_library as well as $tool_flags and
	${dg-extra-tool-flags}.  Factor out annotation text into
	a single variable.

From-SVN: r41029
parent b6dabe89
...@@ -326,6 +326,7 @@ proc dg-test { args } { ...@@ -326,6 +326,7 @@ proc dg-test { args } {
global tool global tool
global srcdir ;# eg: /calvin/dje/devo/gcc/./testsuite/ global srcdir ;# eg: /calvin/dje/devo/gcc/./testsuite/
global host_triplet target_triplet global host_triplet target_triplet
global which_library
set keep 0 set keep 0
set i 0 set i 0
...@@ -411,6 +412,9 @@ proc dg-test { args } { ...@@ -411,6 +412,9 @@ proc dg-test { args } {
rename unknown "" rename unknown ""
rename dg-save-unknown unknown rename dg-save-unknown unknown
# Record the final set of flags, to tag log entries with.
set label "$which_library $tool_flags ${dg-extra-tool-flags}"
# If we're not supposed to try this test on this target, we're done. # If we're not supposed to try this test on this target, we're done.
if { [lindex ${dg-do-what} 1] == "N" } { if { [lindex ${dg-do-what} 1] == "N" } {
unsupported "$name" unsupported "$name"
...@@ -458,28 +462,28 @@ proc dg-test { args } { ...@@ -458,28 +462,28 @@ proc dg-test { args } {
scan $line ${dg-linenum-format} line scan $line ${dg-linenum-format} line
switch [lindex $i 1] { switch [lindex $i 1] {
"ERROR" { "ERROR" {
$ok "$name $comment (test for errors, line $line), $tool_flags ${dg-extra-tool-flags}" $ok "$name $comment (test for errors, line $line), $label"
} }
"XERROR" { "XERROR" {
x$ok "$name $comment (test for errors, line $line), $tool_flags ${dg-extra-tool-flags}" x$ok "$name $comment (test for errors, line $line), $label"
} }
"WARNING" { "WARNING" {
$ok "$name $comment (test for warnings, line $line), $tool_flags ${dg-extra-tool-flags}" $ok "$name $comment (test for warnings, line $line), $label"
} }
"XWARNING" { "XWARNING" {
x$ok "$name $comment (test for warnings, line $line), $tool_flags ${dg-extra-tool-flags}" x$ok "$name $comment (test for warnings, line $line), $label"
} }
"BOGUS" { "BOGUS" {
$uhoh "$name $comment (test for bogus messages, line $line), $tool_flags ${dg-extra-tool-flags}" $uhoh "$name $comment (test for bogus messages, line $line), $label"
} }
"XBOGUS" { "XBOGUS" {
x$uhoh "$name $comment (test for bogus messages, line $line), $tool_flags ${dg-extra-tool-flags}" x$uhoh "$name $comment (test for bogus messages, line $line), $label"
} }
"BUILD" { "BUILD" {
$uhoh "$name $comment (test for build failure, line $line), $tool_flags ${dg-extra-tool-flags}" $uhoh "$name $comment (test for build failure, line $line), $label"
} }
"XBUILD" { "XBUILD" {
x$uhoh "$name $comment (test for build failure, line $line), $tool_flags ${dg-extra-tool-flags}" x$uhoh "$name $comment (test for build failure, line $line), $label"
} }
"EXEC" { } "EXEC" { }
"XEXEC" { } "XEXEC" { }
...@@ -526,10 +530,10 @@ proc dg-test { args } { ...@@ -526,10 +530,10 @@ proc dg-test { args } {
setup_xfail "*-*-*" setup_xfail "*-*-*"
} }
if ![string match "" $comp_output] { if ![string match "" $comp_output] {
fail "$name (test for excess errors), $tool_flags ${dg-extra-tool-flags}" fail "$name (test for excess errors), $label"
send_log "Excess errors:\n$comp_output\n" send_log "Excess errors:\n$comp_output\n"
} else { } else {
pass "$name (test for excess errors), $tool_flags ${dg-extra-tool-flags}" pass "$name (test for excess errors), $label"
} }
} }
...@@ -549,7 +553,7 @@ proc dg-test { args } { ...@@ -549,7 +553,7 @@ proc dg-test { args } {
setup_xfail "*-*-*" setup_xfail "*-*-*"
} }
if { "$status" == "pass" } { if { "$status" == "pass" } {
pass "$name (execution test), $tool_flags ${dg-extra-tool-flags}" pass "$name (execution test), $label"
verbose "Exec succeeded." 3 verbose "Exec succeeded." 3
if { [llength ${dg-output-text}] > 1 } { if { [llength ${dg-output-text}] > 1 } {
#send_user "${dg-output-text}\n" #send_user "${dg-output-text}\n"
...@@ -573,9 +577,9 @@ proc dg-test { args } { ...@@ -573,9 +577,9 @@ proc dg-test { args } {
} else { } else {
verbose "Exec failed, errorCode not defined!" 3 verbose "Exec failed, errorCode not defined!" 3
} }
fail "$name (execution test), $tool_flags ${dg-extra-tool-flags}" fail "$name (execution test), $label"
} else { } else {
$status "$name (execution test), $tool_flags ${dg-extra-tool-flags}" $status "$name (execution test), $label"
} }
} }
} }
......
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