]> Cypherpunks repositories - gostls13.git/commitdiff
internal/testenv: skip network tests only when -short is specified
authorAndrew Gerrand <adg@golang.org>
Thu, 18 Jun 2015 07:33:29 +0000 (17:33 +1000)
committerAndrew Gerrand <adg@golang.org>
Thu, 18 Jun 2015 21:10:44 +0000 (21:10 +0000)
Change-Id: I157879f5204d543eb3fc81c212d563b146473ba8
Reviewed-on: https://go-review.googlesource.com/11232
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/internal/testenv/testenv.go

index a1de61ff489832b5b1fd44f1e35ed7149731c6db..ef5cfcbcd34bf3cc01720bfd3ec04603fe77e11d 100644 (file)
@@ -86,5 +86,7 @@ func HasExternalNetwork() bool {
 // external (non-localhost) networks.
 // If not, MustHaveExternalNetwork calls t.Skip with an explanation.
 func MustHaveExternalNetwork(t *testing.T) {
-       t.Skipf("skipping test: no external network in -short mode")
+       if testing.Short() {
+               t.Skipf("skipping test: no external network in -short mode")
+       }
 }