This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Go testsuite patch committed: Fix env.go for other architectures
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Wed, 30 Mar 2011 14:27:40 -0700
- Subject: Go testsuite patch committed: Fix env.go for other architectures
I brought over this patch to the Go testsuite from the master
repository. This avoids an explicit list of supported architectures, so
that we don't have to add each gcc architecture to the list. Ran Go
testsuite on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
Index: gcc/testsuite/go.test/test/env.go
===================================================================
--- gcc/testsuite/go.test/test/env.go (revision 171697)
+++ gcc/testsuite/go.test/test/env.go (working copy)
@@ -6,7 +6,10 @@
package main
-import os "os"
+import (
+ "os"
+ "runtime"
+)
func main() {
ga, e0 := os.Getenverror("GOARCH")
@@ -14,8 +17,8 @@ func main() {
print("$GOARCH: ", e0.String(), "\n")
os.Exit(1)
}
- if ga != "amd64" && ga != "386" && ga != "arm" {
- print("$GOARCH=", ga, "\n")
+ if ga != runtime.GOARCH {
+ print("$GOARCH=", ga, "!= runtime.GOARCH=", runtime.GOARCH, "\n")
os.Exit(1)
}
xxx, e1 := os.Getenverror("DOES_NOT_EXIST")