aboutsummaryrefslogtreecommitdiff
path: root/test/run.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2019-09-26 17:25:04 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2019-09-26 17:42:40 +0000
commitcb418dd0d16ef0db58fef1dbc1f97afbaf480cd5 (patch)
tree738680c53446670080d3ab329b12eabf39586196 /test/run.go
parenta37f2b4f60aef93fec1911eeac43c33dc5ff1857 (diff)
downloadgo-cb418dd0d16ef0db58fef1dbc1f97afbaf480cd5.tar.gz
go-cb418dd0d16ef0db58fef1dbc1f97afbaf480cd5.zip
test: make -all_codegen default to true on linux-amd64 builder
Fixes #34297 Change-Id: I4584a97d4562d7af0412d683ba1c206e3c1d9edb Reviewed-on: https://go-review.googlesource.com/c/go/+/197539 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'test/run.go')
-rw-r--r--test/run.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/run.go b/test/run.go
index 28ed865c50..a7bee65275 100644
--- a/test/run.go
+++ b/test/run.go
@@ -34,7 +34,7 @@ var (
keep = flag.Bool("k", false, "keep. keep temporary directory.")
numParallel = flag.Int("n", runtime.NumCPU(), "number of parallel tests to run")
summary = flag.Bool("summary", false, "show summary of results")
- allCodegen = flag.Bool("all_codegen", false, "run all goos/goarch for codegen")
+ allCodegen = flag.Bool("all_codegen", defaultAllCodeGen(), "run all goos/goarch for codegen")
showSkips = flag.Bool("show_skips", false, "show skipped tests")
runSkips = flag.Bool("run_skips", false, "run skipped tests (ignore skip and build tags)")
linkshared = flag.Bool("linkshared", false, "")
@@ -45,6 +45,14 @@ var (
shards = flag.Int("shards", 0, "number of shards. If 0, all tests are run. This is used by the continuous build.")
)
+// defaultAllCodeGen returns the default value of the -all_codegen
+// flag. By default, we prefer to be fast (returning false), except on
+// the linux-amd64 builder that's already very fast, so we get more
+// test coverage on trybots. See https://golang.org/issue/34297.
+func defaultAllCodeGen() bool {
+ return os.Getenv("GO_BUILDER_NAME") == "linux-amd64"
+}
+
var (
goos, goarch string