public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go testsuite patch committed: Add -I. when compiling in directory
@ 2020-12-03 19:11 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2020-12-03 19:11 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

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

This Go testsuite patch adds a -I. argument when compiling sources in
a directory.  This tells the compiler to import packages in the
current directory first, which is what we want in the testsuite.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian

* go.test/go-test.exp (go-gc-tests): Add -I. when building all
sources in a directory (errorcheckdir, compiledir, rundir,
rundircmpout).

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2145 bytes --]

5c642e8b52c0508730a6273f0828e8c10b1be057
diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp
index 067f309a296..8f17cb3db71 100644
--- a/gcc/testsuite/go.test/go-test.exp
+++ b/gcc/testsuite/go.test/go-test.exp
@@ -648,7 +648,7 @@ proc go-gc-tests { } {
 		set last [lindex $packages end]
 		set packages [lreplace $packages end end]
 		foreach p $packages {
-		    dg-test -keep-output [lrange $p 1 end] "-O" "-w $DEFAULT_GOCFLAGS"
+		    dg-test -keep-output [lrange $p 1 end] "-O -I." "-w $DEFAULT_GOCFLAGS"
 		    lappend del "[file rootname [file tail [lindex $p 1]]].o"
 		}
 		errchk [lindex $last 1] "[lrange $last 2 end]"
@@ -692,7 +692,7 @@ proc go-gc-tests { } {
 	    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"
+		    dg-test -keep-output [lindex $p 1] "[lrange $p 2 end] -O -I." "-w $DEFAULT_GOCFLAGS"
 		    lappend del "[file rootname [file tail [lindex $p 1]]].o"
 		}
 		foreach f $del {
@@ -712,7 +712,7 @@ proc go-gc-tests { } {
 		set last [lindex $packages end]
 		set packages [lreplace $packages end end]
 		foreach p $packages {
-		    dg-test -keep-output [lrange $p 1 end] "-O" "-w $DEFAULT_GOCFLAGS"
+		    dg-test -keep-output [lrange $p 1 end] "-O -I." "-w $DEFAULT_GOCFLAGS"
 		    lappend del "[file rootname [file tail [lindex $p 1]]].o"
 		}
 		set dg-do-what-default "link"
@@ -737,11 +737,11 @@ proc go-gc-tests { } {
 		set last [lindex $packages end]
 		set packages [lreplace $packages end end]
 		foreach p $packages {
-		    dg-test -keep-output [lrange $p 1 end] "-O" "-w $DEFAULT_GOCFLAGS"
+		    dg-test -keep-output [lrange $p 1 end] "-O -I." "-w $DEFAULT_GOCFLAGS"
 		    lappend del "[file rootname [file tail [lindex $p 1]]].o"
 		}
 		set dg-do-what-default "link"
-		dg-test -keep-output [lrange $last 1 end] "$del -O" "-w $DEFAULT_GOCFLAGS"
+		dg-test -keep-output [lrange $last 1 end] "$del -O -I." "-w $DEFAULT_GOCFLAGS"
 		set base "[file rootname [file tail [lindex $last 1]]]"
 		set output_file "./$base.exe"
 		lappend del $output_file

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

only message in thread, other threads:[~2020-12-03 19:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 19:11 Go testsuite patch committed: Add -I. when compiling in directory 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).