]> Cypherpunks repositories - gostls13.git/commitdiff
net: skip unsupported tests on iOS
authorElias Naur <elias.naur@gmail.com>
Fri, 4 May 2018 09:25:24 +0000 (11:25 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 4 May 2018 14:46:05 +0000 (14:46 +0000)
The new iOS test harness forwards environment variables, such that
tests that skipped on non-builders now run because GO_BUILDER_NAME
is set.

Skip the net tests that rely on resolv.conf being present.

Change-Id: I7875dc4252b2ab696c9aae13a9106ddf296ee8ec
Reviewed-on: https://go-review.googlesource.com/111476
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/lookup_test.go

index ab7306194f41fa7554ff1a0059a8244de3fb61e0..469901e4481826c5e227334e9b64b008ce77ef4b 100644 (file)
@@ -68,6 +68,10 @@ func TestLookupGoogleSRV(t *testing.T) {
                testenv.MustHaveExternalNetwork(t)
        }
 
+       if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
+               t.Skip("no resolv.conf on iOS")
+       }
+
        if !supportsIPv4() || !*testIPv4 {
                t.Skip("IPv4 is required")
        }
@@ -115,6 +119,10 @@ func TestLookupGmailMX(t *testing.T) {
                testenv.MustHaveExternalNetwork(t)
        }
 
+       if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
+               t.Skip("no resolv.conf on iOS")
+       }
+
        if !supportsIPv4() || !*testIPv4 {
                t.Skip("IPv4 is required")
        }
@@ -159,6 +167,10 @@ func TestLookupGmailNS(t *testing.T) {
                testenv.MustHaveExternalNetwork(t)
        }
 
+       if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
+               t.Skip("no resolv.conf on iOS")
+       }
+
        if !supportsIPv4() || !*testIPv4 {
                t.Skip("IPv4 is required")
        }
@@ -203,6 +215,10 @@ func TestLookupGmailTXT(t *testing.T) {
                testenv.MustHaveExternalNetwork(t)
        }
 
+       if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
+               t.Skip("no resolv.conf on iOS")
+       }
+
        if !supportsIPv4() || !*testIPv4 {
                t.Skip("IPv4 is required")
        }
@@ -601,6 +617,10 @@ func TestLookupDotsWithRemoteSource(t *testing.T) {
                t.Skip("IPv4 is required")
        }
 
+       if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
+               t.Skip("no resolv.conf on iOS")
+       }
+
        defer dnsWaitGroup.Wait()
 
        if fixup := forceGoDNS(); fixup != nil {