public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go testsuite patch committed: compiledir fix
@ 2014-07-20 15:47 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2014-07-20 15:47 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 348 bytes --]

This patch to the Go testsuite driver adds support for having multiple
files in a single package for a compiledir test.  Ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


2014-07-20  Ian Lance Taylor  <iant@google.com>

	* go.test/go-test.exp (go-gc-tests): Support multiple files in one
	package for compiledir tests.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1000 bytes --]

Index: go-test.exp
===================================================================
--- go-test.exp	(revision 212213)
+++ go-test.exp	(working copy)
@@ -651,13 +651,17 @@ proc go-gc-tests { } {
 	    set runtests "go-test.exp"
 	    set dg-do-what-default "assemble"
 	    set dir "[file rootname $test].dir"
-	    set del {}
-	    foreach f [lsort [glob "$dir/*.go"]] {
-		dg-test -keep-output $f "-O" "-w $DEFAULT_GOCFLAGS"
-		lappend del "[file rootname [file tail $f]].o"
-	    }
-	    foreach f $del {
-		file delete $f
+	    set files [lsort [glob "$dir/*.go"]]
+	    set packages [go-find-packages $test $name $files]
+	    if { [llength $packages] > 0 } {
+		set del [list]
+		foreach p $packages {
+		    dg-test -keep-output [lindex $p 1] "[lrange $p 2 end] -O" "-w $DEFAULT_GOCFLAGS"
+		    lappend del "[file rootname [file tail [lindex $p 1]]].o"
+		}
+		foreach f $del {
+		    file delete $f
+		}
 	    }
 	    set runtests $hold_runtests
 	} elseif { $test_line == "// rundir" } {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-20 15:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-20 15:47 Go testsuite patch committed: compiledir fix Ian Lance Taylor

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).