From 4570a0811e8b3d7c89573c13d00777b1f8b01a54 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Thu, 9 Dec 2021 12:42:29 -0500 Subject: [PATCH] internal/wycheproof: skip on builders with flaky network connections This test downloads JSON test files from GitHub. If the network connection flakes, the test may hang indefinitely, and builders with flaky network connections might want to avoid unnecessary downloading anyway. Fixes golang/go#50076 Change-Id: I0655a34fce8a003794290c0c82ae75492eda4429 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/370659 Trust: Bryan Mills Run-TryBot: Bryan Mills Reviewed-by: Roland Shoemaker Reviewed-by: Katie Hockman TryBot-Result: Gopher Robot --- internal/wycheproof/wycheproof_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/wycheproof/wycheproof_test.go b/internal/wycheproof/wycheproof_test.go index 983ba5c..69c6117 100644 --- a/internal/wycheproof/wycheproof_test.go +++ b/internal/wycheproof/wycheproof_test.go @@ -33,6 +33,10 @@ func TestMain(m *testing.M) { log.Printf("skipping test because 'go' command is unavailable: %v", err) os.Exit(0) } + if os.Getenv("GO_BUILDER_FLAKY_NET") != "" { + log.Printf("skipping test because GO_BUILDER_FLAKY_NET is set") + os.Exit(0) + } // Download the JSON test files from github.com/google/wycheproof // using `go mod download -json` so the cached source of the testdata