mirror of
https://github.com/golang/go
synced 2024-11-22 00:04:41 -07:00
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
This commit is contained in:
parent
61aaadf217
commit
e008757d64
@ -6,7 +6,10 @@
|
|||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import os "os"
|
import (
|
||||||
|
"os"
|
||||||
|
"runtime"
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
ga, e0 := os.Getenverror("GOARCH")
|
ga, e0 := os.Getenverror("GOARCH")
|
||||||
@ -14,8 +17,8 @@ func main() {
|
|||||||
print("$GOARCH: ", e0.String(), "\n")
|
print("$GOARCH: ", e0.String(), "\n")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if ga != "amd64" && ga != "386" && ga != "arm" {
|
if ga != runtime.GOARCH {
|
||||||
print("$GOARCH=", ga, "\n")
|
print("$GOARCH=", ga, "!= runtime.GOARCH=", runtime.GOARCH, "\n")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
xxx, e1 := os.Getenverror("DOES_NOT_EXIST")
|
xxx, e1 := os.Getenverror("DOES_NOT_EXIST")
|
||||||
|
Loading…
Reference in New Issue
Block a user