mirror of
https://github.com/golang/go
synced 2024-11-19 07:04:43 -07:00
net: treat android like linux in tests
LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/112810043
This commit is contained in:
parent
a31eeef7ff
commit
8b6dafa80e
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user