1
0
mirror of https://github.com/golang/go synced 2024-11-26 15:46:54 -07:00

cmd/go: fix TestBuildIDContainsArchModeEnv fail on arm64

TestBuildIDContainsArchModeEnv fails on arm64 because defaultGO386 has
different value from x86 (amd64/386). On arm64 defaultGO386 = '387' but
on x86 defaultGO386 = 'sse2'. The difference will make the test succeed
on x86 while fail on arm64 since it generates the same build ID.
Fix it by explicitly setting GO386 instead of using default value

Fixes #20608

Change-Id: I864b0e47325942d9513516bdf47f60391d18c0d0
Reviewed-on: https://go-review.googlesource.com/45112
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Wei Xiao 2017-06-06 02:03:55 +00:00 committed by Brad Fitzpatrick
parent 32d42fb6ec
commit 0c38d789bc

View File

@ -4158,7 +4158,7 @@ func main() {}`)
tg.setenv("GOARCH", "386")
tg.setenv("GO386", "387")
}, func() {
tg.setenv("GO386", "")
tg.setenv("GO386", "sse2")
}))
t.Run("arm", testWith(func() {