Skip to content

Commit 40d1ec5

Browse files
committed
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 <[email protected]> Run-TryBot: Cherry Zhang <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 70e022e commit 40d1ec5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/cmd/dist/test.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,14 @@ func (t *tester) registerTests() {
466466
})
467467
}
468468

469-
// Test the ios build tag on darwin/amd64 for the iOS simulator.
470-
if goos == "darwin" && goarch == "amd64" {
469+
// Test ios/amd64 for the iOS simulator.
470+
if goos == "darwin" && goarch == "amd64" && t.cgoEnabled {
471471
t.tests = append(t.tests, distTest{
472472
name: "amd64ios",
473-
heading: "ios tag on darwin/amd64",
473+
heading: "GOOS=ios on darwin/amd64",
474474
fn: func(dt *distTest) error {
475-
t.addCmd(dt, "src", t.goTest(), t.timeout(300), "-tags=ios", "-run=SystemRoots", "crypto/x509")
475+
cmd := t.addCmd(dt, "src", t.goTest(), t.timeout(300), "-run=SystemRoots", "crypto/x509")
476+
cmd.Env = append(os.Environ(), "GOOS=ios", "CGO_ENABLED=1")
476477
return nil
477478
},
478479
})

0 commit comments

Comments
 (0)