internal/wycheproof: skip all tests in short test mode

The testdata for this package is around 8 MB and downloaded dynamically
via 'go mod download' from its canonical source rather than being copied
to this repository. We're moving towards disallowing all network use in
short test mode, including, so add a corresponding test

Needing to lookup a go test flag is unfortunate, but I don't know of a
less bad available option while the test does the download in TestMain.

On balance, it becomes viable to no longer disable the checksum database
since the test will only run on builders that permit internet use and so should just work.

Change-Id: Iaffe3899351da375928aaba114c4875f5438336b
Run-TryBot: Dmitri Shuralyov <>
Auto-Submit: Dmitri Shuralyov <>
Reviewed-by: Heschi Kreinick <>
Reviewed-by: Dmitri Shuralyov <>
TryBot-Result: Gopher Robot <>
diff --git a/internal/wycheproof/wycheproof_test.go b/internal/wycheproof/wycheproof_test.go
index fcae97c..bbaae3b 100644
--- a/internal/wycheproof/wycheproof_test.go
+++ b/internal/wycheproof/wycheproof_test.go
@@ -11,6 +11,7 @@
+	"flag"
@@ -28,6 +29,11 @@
 var wycheproofTestVectorsDir string
 func TestMain(m *testing.M) {
+	flag.Parse()
+	if flag.Lookup("test.short").Value.(flag.Getter).Get().(bool) {
+		log.Println("skipping test that downloads testdata via 'go mod download' in short mode")
+		os.Exit(0)
+	}
 	if _, err := exec.LookPath("go"); err != nil {
 		log.Printf("skipping test because 'go' command is unavailable: %v", err)
@@ -42,8 +48,6 @@
 	// can be used in the following tests.
 	path := "" + wycheproofModVer
 	cmd := exec.Command("go", "mod", "download", "-json", path)
-	// TODO: enable the sumdb once the Trybots proxy supports it.
-	cmd.Env = append(os.Environ(), "GONOSUMDB=*")
 	output, err := cmd.Output()
 	if err != nil {
 		log.Fatalf("failed to run `go mod download -json %s`, output: %s", path, output)