|
34 | 34 | keep = flag.Bool("k", false, "keep. keep temporary directory.")
|
35 | 35 | numParallel = flag.Int("n", runtime.NumCPU(), "number of parallel tests to run")
|
36 | 36 | summary = flag.Bool("summary", false, "show summary of results")
|
37 |
| - allCodegen = flag.Bool("all_codegen", false, "run all goos/goarch for codegen") |
| 37 | + allCodegen = flag.Bool("all_codegen", defaultAllCodeGen(), "run all goos/goarch for codegen") |
38 | 38 | showSkips = flag.Bool("show_skips", false, "show skipped tests")
|
39 | 39 | runSkips = flag.Bool("run_skips", false, "run skipped tests (ignore skip and build tags)")
|
40 | 40 | linkshared = flag.Bool("linkshared", false, "")
|
|
45 | 45 | shards = flag.Int("shards", 0, "number of shards. If 0, all tests are run. This is used by the continuous build.")
|
46 | 46 | )
|
47 | 47 |
|
| 48 | +// defaultAllCodeGen returns the default value of the -all_codegen |
| 49 | +// flag. By default, we prefer to be fast (returning false), except on |
| 50 | +// the linux-amd64 builder that's already very fast, so we get more |
| 51 | +// test coverage on trybots. See https://golang.org/issue/34297. |
| 52 | +func defaultAllCodeGen() bool { |
| 53 | + return os.Getenv("GO_BUILDER_NAME") == "linux-amd64" |
| 54 | +} |
| 55 | + |
48 | 56 | var (
|
49 | 57 | goos, goarch string
|
50 | 58 |
|
|
0 commit comments