diff options
author | Ian Lance Taylor <iant@golang.org> | 2011-03-30 14:24:32 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2011-03-30 14:24:32 -0700 |
commit | e008757d64663eeb3dc4e434963638b9a9cb474d (patch) | |
tree | b61ff76de8de1218355231acdea1d0c193ab4901 | |
parent | 61aaadf2175ec58e91d1188c1986d71c1d853389 (diff) | |
download | go-e008757d64663eeb3dc4e434963638b9a9cb474d.tar.gz go-e008757d64663eeb3dc4e434963638b9a9cb474d.zip |
test: don't require specific GOARCH values.
This lets the test work for gccgo on other architectures.
R=r, rsc1
CC=golang-dev
https://golang.org/cl/4326044
-rw-r--r-- | test/env.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/env.go b/test/env.go index 16b2076447..28113bcb06 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") |