aboutsummaryrefslogtreecommitdiff
path: root/src/internal/testenv
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-05-06 16:24:57 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-05-06 17:24:09 +0000
commit1ff57143af65014c80e39cc0f19cd97a455f5b49 (patch)
tree9cd438ac7eff531964969dd9b4894ebbdc639a94 /src/internal/testenv
parent61602b0e9e1daa0490793ef9ada3a51f8f482265 (diff)
downloadgo-1ff57143af65014c80e39cc0f19cd97a455f5b49.tar.xz
net: ignore network failures on some builders
We run the external network tests on builders, but some of our builders have less-than-ideal DNS connectivity. This change continues to run the tests on all builders, but marks certain builders as flaky (network-wise), and only validates their DNS results if they got DNS results. Change-Id: I826dc2a6f6da55add89ae9c6db892b3b2f7b526b Reviewed-on: https://go-review.googlesource.com/22852 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/internal/testenv')
-rw-r--r--src/internal/testenv/testenv.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go
index 9e684e3034..f134f6b04a 100644
--- a/src/internal/testenv/testenv.go
+++ b/src/internal/testenv/testenv.go
@@ -16,6 +16,7 @@ import (
"os/exec"
"path/filepath"
"runtime"
+ "strconv"
"strings"
"testing"
)
@@ -133,3 +134,9 @@ func SkipFlaky(t *testing.T, issue int) {
t.Skipf("skipping known flaky test without the -flaky flag; see golang.org/issue/%d", issue)
}
}
+
+func SkipFlakyNet(t *testing.T) {
+ if v, _ := strconv.ParseBool(os.Getenv("GO_BUILDER_FLAKY_NET")); v {
+ t.Skip("skipping test on builder known to have frequent network failures")
+ }
+}