Commit 8b6dafa8 authored by David Crawshaw's avatar David Crawshaw

net: treat android like linux in tests

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/112810043
parent a31eeef7
......@@ -38,7 +38,7 @@ func TestConnAndListener(t *testing.T) {
}
case "unixpacket":
switch runtime.GOOS {
case "darwin", "nacl", "openbsd", "plan9", "windows":
case "android", "darwin", "nacl", "openbsd", "plan9", "windows":
continue
case "freebsd": // FreeBSD 8 doesn't support unixpacket
continue
......
......@@ -25,7 +25,7 @@ var ipv4MulticastListenerTests = []struct {
// port.
func TestIPv4MulticastListener(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9":
case "android", "nacl", "plan9":
t.Skipf("skipping test on %q", runtime.GOOS)
case "solaris":
t.Skipf("skipping test on solaris, see issue 7399")
......
......@@ -12,9 +12,9 @@ import (
)
func TestReadLine(t *testing.T) {
// /etc/services file does not exist on windows and Plan 9.
// /etc/services file does not exist on android, plan9, windows.
switch runtime.GOOS {
case "plan9", "windows":
case "android", "plan9", "windows":
t.Skipf("skipping test on %q", runtime.GOOS)
}
filename := "/etc/services" // a nice big file
......
......@@ -256,8 +256,11 @@ func TestUnixConnLocalAndRemoteNames(t *testing.T) {
t.Fatalf("UnixConn.Write failed: %v", err)
}
if runtime.GOOS == "linux" && laddr == "" {
laddr = "@" // autobind feature
switch runtime.GOOS {
case "android", "linux":
if laddr == "" {
laddr = "@" // autobind feature
}
}
var connAddrs = [3]struct{ got, want Addr }{
{ln.Addr(), ta},
......@@ -308,9 +311,13 @@ func TestUnixgramConnLocalAndRemoteNames(t *testing.T) {
}
}()
if runtime.GOOS == "linux" && laddr == "" {
laddr = "@" // autobind feature
switch runtime.GOOS {
case "android", "linux":
if laddr == "" {
laddr = "@" // autobind feature
}
}
var connAddrs = [4]struct{ got, want Addr }{
{c1.LocalAddr(), ta},
{c1.RemoteAddr(), 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