Patchwork Fix scan-assembler in libstdc++ testsuite

login
register
mail settings
Submitter Andreas Schwab
Date Dec. 9, 2012, 2:31 p.m.
Message ID <m2boe370v5.fsf@igel.home>
Download mbox | patch
Permalink /patch/204702/
State New
Headers show

Comments

Andreas Schwab - Dec. 9, 2012, 2:31 p.m.
testname-for-summary in gcc/testsuite/lib/target-supports-dg.exp caches
testname_with_flags and depends on dg-test to reset it after each test
source file.  The wrapper in the libstdc++ didn't do that, causing
dg-scan-assembler to look at the wrong file.  Installed as obvious.

Andreas.

	* testsuite/lib/libstdc++.exp (dg-test): Unset testname_with_flags
	after running the test.

Patch

diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index b3be88f..10b9738 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -389,15 +389,22 @@  if { [info procs saved-dg-test] == [list] } {
     proc dg-test { args } {
 	global additional_prunes
 	global errorInfo
+	global testname_with_flags
 
 	if { [ catch { eval saved-dg-test $args } errmsg ] } {
 	    set saved_info $errorInfo
 	    set additional_prunes ""
+	    if [info exists testname_with_flags] {
+		unset testname_with_flags
+	    }
 	    unset_timeout_vars
 	    error $errmsg $saved_info
 	}
 	set additional_prunes ""
 	unset_timeout_vars
+	if [info exists testname_with_flags] {
+	    unset testname_with_flags
+	}
     }
 }