]> Cypherpunks repositories - gostls13.git/commitdiff
net: add skip message to test
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 6 Mar 2012 06:41:17 +0000 (15:41 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 6 Mar 2012 06:41:17 +0000 (15:41 +0900)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5753048

src/pkg/net/multicast_test.go
src/pkg/net/net_test.go
src/pkg/net/parse_test.go
src/pkg/net/server_test.go
src/pkg/net/timeout_test.go
src/pkg/net/udp_test.go
src/pkg/net/unicast_test.go

index 1d760c21051ff5e0999ed2e7f0b49440bd95e8fb..fe5e8de2f654e215be9e391ef516e52b3baee5d6 100644 (file)
@@ -47,9 +47,11 @@ var multicastListenerTests = []struct {
 func TestMulticastListener(t *testing.T) {
        switch runtime.GOOS {
        case "netbsd", "openbsd", "plan9", "windows":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        case "linux":
                if runtime.GOARCH == "arm" || runtime.GOARCH == "alpha" {
+                       t.Logf("skipping test on %q/%q", runtime.GOOS, runtime.GOARCH)
                        return
                }
        }
@@ -86,6 +88,7 @@ func TestMulticastListener(t *testing.T) {
 func TestSimpleMulticastListener(t *testing.T) {
        switch runtime.GOOS {
        case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
 
index f62fc6547cba4a63520b54b70502026fef777b04..d4409cc491fea5d83238d2db31a9f84259a1f0ef 100644 (file)
@@ -21,6 +21,7 @@ var avoidOSXFirewallDialogPopup = func() bool {
 
 func TestShutdown(t *testing.T) {
        if runtime.GOOS == "plan9" {
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
        l, err := Listen("tcp", "127.0.0.1:0")
index dfbaba4d9e8db7580dc0036933cacbf711904621..30fda45dfd4e70d6f42e2e7f44ebfd456f09a0fd 100644 (file)
@@ -13,7 +13,9 @@ import (
 
 func TestReadLine(t *testing.T) {
        // /etc/services file does not exist on windows and Plan 9.
-       if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
+       switch runtime.GOOS {
+       case "plan9", "windows":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
        filename := "/etc/services" // a nice big file
index 64a979634d17e93fa42d497616904f1e0d57fb04..d5ea7898809e751e42012b5a8b77e3865e393b1c 100644 (file)
@@ -142,6 +142,7 @@ var seqpacketConnServerTests = []struct {
 
 func TestSeqpacketConnServer(t *testing.T) {
        if runtime.GOOS != "linux" {
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
 
index acae7fa03ba6eb48f356b31e3fe1a3578a73857c..672fb7241d7e54ae8605a64d89ca92bd97f24f70 100644 (file)
@@ -57,7 +57,9 @@ func testTimeout(t *testing.T, net, addr string, readFrom bool) {
 }
 
 func TestTimeoutUDP(t *testing.T) {
-       if runtime.GOOS == "plan9" {
+       switch runtime.GOOS {
+       case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
 
@@ -73,7 +75,9 @@ func TestTimeoutUDP(t *testing.T) {
 }
 
 func TestTimeoutTCP(t *testing.T) {
-       if runtime.GOOS == "plan9" {
+       switch runtime.GOOS {
+       case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
 
@@ -88,7 +92,9 @@ func TestTimeoutTCP(t *testing.T) {
 }
 
 func TestDeadlineReset(t *testing.T) {
-       if runtime.GOOS == "plan9" {
+       switch runtime.GOOS {
+       case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
        ln, err := Listen("tcp", "127.0.0.1:0")
index ea5fad41a53197ded90b6593c6e94920fbf2d180..f80d3b5a9cfa77e2e50549406e13a42e24b60155 100644 (file)
@@ -10,7 +10,9 @@ import (
 )
 
 func TestWriteToUDP(t *testing.T) {
-       if runtime.GOOS == "plan9" {
+       switch runtime.GOOS {
+       case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
 
index 4fd5d32d917cca8954f98e39b27396fd06c793d3..fc6089414d7f4a256bf63fd4a7cc84a4fc3645c6 100644 (file)
@@ -45,6 +45,7 @@ var listenerTests = []struct {
 func TestTCPListener(t *testing.T) {
        switch runtime.GOOS {
        case "plan9", "windows":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
 
@@ -80,6 +81,7 @@ func TestTCPListener(t *testing.T) {
 func TestUDPListener(t *testing.T) {
        switch runtime.GOOS {
        case "plan9", "windows":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
 
@@ -125,6 +127,7 @@ func TestUDPListener(t *testing.T) {
 func TestSimpleTCPListener(t *testing.T) {
        switch runtime.GOOS {
        case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
 
@@ -150,6 +153,7 @@ func TestSimpleTCPListener(t *testing.T) {
 func TestSimpleUDPListener(t *testing.T) {
        switch runtime.GOOS {
        case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
 
@@ -255,6 +259,7 @@ var dualStackListenerTests = []struct {
 func TestDualStackTCPListener(t *testing.T) {
        switch runtime.GOOS {
        case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
        if !supportsIPv6 {
@@ -291,6 +296,7 @@ func TestDualStackTCPListener(t *testing.T) {
 func TestDualStackUDPListener(t *testing.T) {
        switch runtime.GOOS {
        case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
        if !supportsIPv6 {
@@ -521,6 +527,7 @@ var prohibitionaryDialArgTests = []struct {
 func TestProhibitionaryDialArgs(t *testing.T) {
        switch runtime.GOOS {
        case "plan9":
+               t.Logf("skipping test on %q", runtime.GOOS)
                return
        }
        // This test requires both IPv6 and IPv6 IPv4-mapping functionality.