From 42219419ba07b8669c9ddc4fcd60194188171e12 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 4 May 2018 11:25:24 +0200 Subject: [PATCH] net: skip unsupported tests on iOS 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/net/lookup_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/net/lookup_test.go b/src/net/lookup_test.go index ab7306194f..469901e448 100644 --- a/src/net/lookup_test.go +++ b/src/net/lookup_test.go @@ -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 { -- 2.48.1