diff --git a/src/cmd/go/internal/test/flagdefs.go b/src/cmd/go/internal/test/flagdefs.go index b91204ee937..d9f4fca17a1 100644 --- a/src/cmd/go/internal/test/flagdefs.go +++ b/src/cmd/go/internal/test/flagdefs.go @@ -49,6 +49,7 @@ var passAnalyzersToVet = map[string]bool{ "cgocall": true, "composites": true, "copylocks": true, + "directive": true, "errorsas": true, "framepointer": true, "httpresponse": true, @@ -66,6 +67,7 @@ var passAnalyzersToVet = map[string]bool{ "structtag": true, "testinggoroutine": true, "tests": true, + "timeformat": true, "unmarshal": true, "unreachable": true, "unsafeptr": true, diff --git a/src/cmd/go/internal/test/flagdefs_test.go b/src/cmd/go/internal/test/flagdefs_test.go index 337f136d061..1c46d78b1bc 100644 --- a/src/cmd/go/internal/test/flagdefs_test.go +++ b/src/cmd/go/internal/test/flagdefs_test.go @@ -9,6 +9,7 @@ import ( "cmd/go/internal/test/internal/genflags" "flag" "internal/testenv" + "os" "reflect" "strings" "testing" @@ -16,6 +17,7 @@ import ( func TestMain(m *testing.M) { cfg.SetGOROOT(testenv.GOROOT(nil), false) + os.Exit(m.Run()) } func TestPassFlagToTestIncludesAllTestFlags(t *testing.T) { diff --git a/src/cmd/go/internal/test/genflags.go b/src/cmd/go/internal/test/genflags.go index 8c7554919a5..625f94133a1 100644 --- a/src/cmd/go/internal/test/genflags.go +++ b/src/cmd/go/internal/test/genflags.go @@ -75,7 +75,7 @@ func testFlags() []string { } switch name { - case "testlogfile", "paniconexit0", "fuzzcachedir", "fuzzworker": + case "testlogfile", "paniconexit0", "fuzzcachedir", "fuzzworker", "gocoverdir": // These flags are only for use by cmd/go. default: names = append(names, name)