Skip to content

Commit 910f041

Browse files
Bryan C. Millsgopherbot
Bryan C. Mills
authored andcommitted
cmd/go/internal/test: refresh flagdefs.go and fix test
The tests for cmd/go/internal/test were not running at all due to a missed call to m.Run in TestMain. That masked two missing vet analyzers ("directive" and "timeformat") and a missed update to the generator script in CL 355452. Fixes #58415. Change-Id: I7b0315952967ca07a866cdaa5903478b2873eb7a Reviewed-on: https://go-review.googlesource.com/c/go/+/466635 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]>
1 parent 0d8d181 commit 910f041

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/cmd/go/internal/test/flagdefs.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/go/internal/test/flagdefs_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ import (
99
"cmd/go/internal/test/internal/genflags"
1010
"flag"
1111
"internal/testenv"
12+
"os"
1213
"reflect"
1314
"strings"
1415
"testing"
1516
)
1617

1718
func TestMain(m *testing.M) {
1819
cfg.SetGOROOT(testenv.GOROOT(nil), false)
20+
os.Exit(m.Run())
1921
}
2022

2123
func TestPassFlagToTestIncludesAllTestFlags(t *testing.T) {

src/cmd/go/internal/test/genflags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func testFlags() []string {
7575
}
7676

7777
switch name {
78-
case "testlogfile", "paniconexit0", "fuzzcachedir", "fuzzworker":
78+
case "testlogfile", "paniconexit0", "fuzzcachedir", "fuzzworker", "gocoverdir":
7979
// These flags are only for use by cmd/go.
8080
default:
8181
names = append(names, name)

0 commit comments

Comments
 (0)