This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go testsuite patch committed: Avoid skipping tests inappropriately


This patch to the Go testsuite driver go-test.exp avoids skipping some
tests inappropriately when invoking DejaGNU with go-test.exp=xxx.  The
problem is that go-test.exp calls runtest_file_p to see whether to run
the test.  If it should, then in a few cases it invokes go-dg-runtest to
do the testing, and that does another call to runtest_file_p.  However,
the second invocation will in some cases use a different name, because
some of the tests create a file and run tests on that.  This patch
temporarily clears the list of tests before calling go-dg-runtest, to
avoid inappropriately skipping the later test.  Bootstrapped and ran Go
testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


2010-12-21  Ian Lance Taylor  <iant@google.com>

	* go.test/go-test.exp: Clear runtests around invocation of
	go-dg-runtest from errchk and go-execute-xfail.


Index: gcc/testsuite/go.test/go-test.exp
===================================================================
--- gcc/testsuite/go.test/go-test.exp	(revision 168134)
+++ gcc/testsuite/go.test/go-test.exp	(working copy)
@@ -38,6 +38,7 @@ load_lib go-torture.exp
 proc errchk { test } {
     global dg-do-what-default
     global DEFAULT_GOCFLAGS
+    global runtests
 
     set saved-dg-do-what-default ${dg-do-what-default}
     set dg-do-what-default compile
@@ -72,7 +73,12 @@ proc errchk { test } {
     }
     close $fdin
     close $fdout
+
+    set hold_runtests $runtests
+    set runtests "go-test.exp"
     go-dg-runtest $filename "-fno-show-column $DEFAULT_GOCFLAGS"
+    set runtests $hold_runtests
+
     file delete $filename
     set dg-do-what-default ${saved-dg-do-what-default}
 }
@@ -80,6 +86,7 @@ proc errchk { test } {
 # This is an execution test which should fail.
 proc go-execute-xfail { test } {
     global DEFAULT_GOCFLAGS
+    global runtests
 
     set filename [file tail $test]
     set fdin [open $test r]
@@ -90,7 +97,12 @@ proc go-execute-xfail { test } {
     }
     close $fdin
     close $fdout
+
+    set hold_runtests $runtests
+    set runtests "go-test.exp"
     go-dg-runtest $filename "-w $DEFAULT_GOCFLAGS"
+    set runtests $hold_runtests
+
     file delete $filename
 }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]