summaryrefslogtreecommitdiff
path: root/test/env.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2011-03-30 14:24:32 -0700
committerIan Lance Taylor <iant@golang.org>2011-03-30 14:24:32 -0700
commit5f928cc536d1fceeef744492314b03108f391efc (patch)
tree7f6b09f85ecafd6c5155dfbeb6085dd94ec7065e /test/env.go
parentbaf07858600061315bb47cb9dc9f18fba4d52884 (diff)
downloadgo-5f928cc536d1fceeef744492314b03108f391efc.tar.gz
test: don't require specific GOARCH values.
This lets the test work for gccgo on other architectures. R=r, rsc1 CC=golang-dev http://codereview.appspot.com/4326044
Diffstat (limited to 'test/env.go')
-rw-r--r--test/env.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/env.go b/test/env.go
index 16b207644..28113bcb0 100644
--- a/test/env.go
+++ b/test/env.go
@@ -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")