]> Cypherpunks repositories - gostls13.git/commitdiff
build: remove DISABLE_NET_TESTS
authorRuss Cox <rsc@golang.org>
Fri, 15 Apr 2011 12:20:42 +0000 (08:20 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 15 Apr 2011 12:20:42 +0000 (08:20 -0400)
Don't use external network during all.bash.

R=r, r2, rh, ality
CC=golang-dev
https://golang.org/cl/4429041

src/pkg/Makefile
src/pkg/net/dialgoogle_test.go
src/pkg/syslog/syslog_test.go

index e45b39e86a84ce3d89c340ecafe1afc2c6d46722..de96229723bc2b73582d49eccad36a65ff77903a 100644 (file)
@@ -202,11 +202,6 @@ NOTEST+=\
 NOBENCH+=\
        container/vector\
 
-# Disable tests that depend on an external network.
-ifeq ($(DISABLE_NET_TESTS),1)
-NOTEST+=net syslog
-endif
-
 # Disable tests that windows cannot run yet.
 ifeq ($(GOOS),windows)
 NOTEST+=os/signal    # no signals
index 9a9c02ebd717f874151c98dad145fe81832458af..bec4ad794cf30230093eef13e1eb4b644bf390f8 100644 (file)
@@ -56,6 +56,11 @@ var googleaddrs = []string{
 }
 
 func TestLookupCNAME(t *testing.T) {
+       if testing.Short() {
+               // Don't use external network.
+               t.Logf("skipping external network test during -short")
+               return
+       }
        cname, err := LookupCNAME("www.google.com")
        if cname != "www.l.google.com." || err != nil {
                t.Errorf(`LookupCNAME("www.google.com.") = %q, %v, want "www.l.google.com.", nil`, cname, err)
@@ -63,6 +68,11 @@ func TestLookupCNAME(t *testing.T) {
 }
 
 func TestDialGoogle(t *testing.T) {
+       if testing.Short() {
+               // Don't use external network.
+               t.Logf("skipping external network test during -short")
+               return
+       }
        // If no ipv6 tunnel, don't try the last address.
        if !*ipv6 {
                googleaddrs[len(googleaddrs)-1] = ""
index 2958bcb1f8e5dd3660c0a26d53464746ad97f317..4816ddf2a3121c8364a1a7e733b32cc8d8d93f7a 100644 (file)
@@ -52,6 +52,10 @@ func TestNewLogger(t *testing.T) {
 }
 
 func TestDial(t *testing.T) {
+       if testing.Short() {
+               // Depends on syslog daemon running, and sometimes it's not.
+               t.Logf("skipping syslog test during -short")
+       }
        l, err := Dial("", "", LOG_ERR, "syslog_test")
        if err != nil {
                t.Fatalf("Dial() failed: %s", err)