aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-10-24 22:02:50 -0400
committerCherry Zhang <cherryyz@google.com>2020-10-28 00:25:05 +0000
commit40d1ec588f492f63637b59e933d6c682d66659a4 (patch)
treeb7747623312b9067cfa4cc90c000978451368b25
parent70e022e4a83dc996ac4f108e811fbc399ad5565b (diff)
downloadgo-40d1ec588f492f63637b59e933d6c682d66659a4.tar.gz
go-40d1ec588f492f63637b59e933d6c682d66659a4.zip
cmd/dist: use GOOS=ios for iOS simulator test
Updates #42100. Change-Id: Ib59432bea99a9dd6e25fbd759b31e423dc250f42 Reviewed-on: https://go-review.googlesource.com/c/go/+/265197 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--src/cmd/dist/test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 3cf49dc8ad..aeffc2659f 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -466,13 +466,14 @@ func (t *tester) registerTests() {
})
}
- // Test the ios build tag on darwin/amd64 for the iOS simulator.
- if goos == "darwin" && goarch == "amd64" {
+ // Test ios/amd64 for the iOS simulator.
+ if goos == "darwin" && goarch == "amd64" && t.cgoEnabled {
t.tests = append(t.tests, distTest{
name: "amd64ios",
- heading: "ios tag on darwin/amd64",
+ heading: "GOOS=ios on darwin/amd64",
fn: func(dt *distTest) error {
- t.addCmd(dt, "src", t.goTest(), t.timeout(300), "-tags=ios", "-run=SystemRoots", "crypto/x509")
+ cmd := t.addCmd(dt, "src", t.goTest(), t.timeout(300), "-run=SystemRoots", "crypto/x509")
+ cmd.Env = append(os.Environ(), "GOOS=ios", "CGO_ENABLED=1")
return nil
},
})