]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: use GOOS=ios for iOS simulator test
authorCherry Zhang <cherryyz@google.com>
Sun, 25 Oct 2020 02:02:50 +0000 (22:02 -0400)
committerCherry Zhang <cherryyz@google.com>
Wed, 28 Oct 2020 00:25:05 +0000 (00:25 +0000)
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>
src/cmd/dist/test.go

index 3cf49dc8ad2e7870928de42520514089e336954c..aeffc2659f9cb3b78e506cba8f51949c87f8b93e 100644 (file)
@@ -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
                        },
                })