Commit 42219419 authored by Elias Naur's avatar Elias Naur Committed by Brad Fitzpatrick

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 <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 164718ae
...@@ -68,6 +68,10 @@ func TestLookupGoogleSRV(t *testing.T) { ...@@ -68,6 +68,10 @@ func TestLookupGoogleSRV(t *testing.T) {
testenv.MustHaveExternalNetwork(t) testenv.MustHaveExternalNetwork(t)
} }
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
t.Skip("no resolv.conf on iOS")
}
if !supportsIPv4() || !*testIPv4 { if !supportsIPv4() || !*testIPv4 {
t.Skip("IPv4 is required") t.Skip("IPv4 is required")
} }
...@@ -115,6 +119,10 @@ func TestLookupGmailMX(t *testing.T) { ...@@ -115,6 +119,10 @@ func TestLookupGmailMX(t *testing.T) {
testenv.MustHaveExternalNetwork(t) testenv.MustHaveExternalNetwork(t)
} }
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
t.Skip("no resolv.conf on iOS")
}
if !supportsIPv4() || !*testIPv4 { if !supportsIPv4() || !*testIPv4 {
t.Skip("IPv4 is required") t.Skip("IPv4 is required")
} }
...@@ -159,6 +167,10 @@ func TestLookupGmailNS(t *testing.T) { ...@@ -159,6 +167,10 @@ func TestLookupGmailNS(t *testing.T) {
testenv.MustHaveExternalNetwork(t) testenv.MustHaveExternalNetwork(t)
} }
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
t.Skip("no resolv.conf on iOS")
}
if !supportsIPv4() || !*testIPv4 { if !supportsIPv4() || !*testIPv4 {
t.Skip("IPv4 is required") t.Skip("IPv4 is required")
} }
...@@ -203,6 +215,10 @@ func TestLookupGmailTXT(t *testing.T) { ...@@ -203,6 +215,10 @@ func TestLookupGmailTXT(t *testing.T) {
testenv.MustHaveExternalNetwork(t) testenv.MustHaveExternalNetwork(t)
} }
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
t.Skip("no resolv.conf on iOS")
}
if !supportsIPv4() || !*testIPv4 { if !supportsIPv4() || !*testIPv4 {
t.Skip("IPv4 is required") t.Skip("IPv4 is required")
} }
...@@ -601,6 +617,10 @@ func TestLookupDotsWithRemoteSource(t *testing.T) { ...@@ -601,6 +617,10 @@ func TestLookupDotsWithRemoteSource(t *testing.T) {
t.Skip("IPv4 is required") 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() defer dnsWaitGroup.Wait()
if fixup := forceGoDNS(); fixup != nil { if fixup := forceGoDNS(); fixup != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment