]> Cypherpunks repositories - gostls13.git/commitdiff
net: treat android like linux in tests
authorDavid Crawshaw <david.crawshaw@zentus.com>
Tue, 8 Jul 2014 17:41:18 +0000 (13:41 -0400)
committerDavid Crawshaw <david.crawshaw@zentus.com>
Tue, 8 Jul 2014 17:41:18 +0000 (13:41 -0400)
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/112810043

src/pkg/net/conn_test.go
src/pkg/net/multicast_test.go
src/pkg/net/parse_test.go
src/pkg/net/unix_test.go

index 37bb4e2c0710ee7022a6168ba708d43a0dec8b0f..9c9d1a8057de8bb1756f4e1c6a822db432ed7726 100644 (file)
@@ -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
index 63dbce88e9a5550b18e1bba1dacba3befac90fd0..5f253f44a45109bdbdbbc3de7c76353342404432 100644 (file)
@@ -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")
index b86bc32884b3aae897257c2c92098da493f123ea..7b213b75bdef14c14b14fc77658c439168a01f7c 100644 (file)
@@ -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
index 05643ddf9aeae6dcdb1989f22a1c8b6d29b80cb8..1cdff3908c1ad3e962a64b168db8c3880b0391fe 100644 (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},