aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-05-19 12:10:38 -0700
committerIan Lance Taylor <iant@golang.org>2022-05-19 21:32:46 +0000
commitdd83fd8a70d324be96d2fcac753b202db0625538 (patch)
treee5b14c85a9dd86b1d4a6411259926f0d118b2244 /src/cmd/dist
parent34507e879d31d082eeb5f5722c6c2aceaeb7e052 (diff)
downloadgo-dd83fd8a70d324be96d2fcac753b202db0625538.tar.xz
cmd/dist: pass a -test.timeout option to a host test
For a host test we build the test using "go test -c" and then run the test binary. A test binary run in this way has no default timeout. This CL gives it a timeout of 5 minutes, scaled for the target. We can adjust the timeout if necessary. For #52998 Change-Id: Ib759142f3e71cbb37ec858182998fc5d4fba7ab6 Reviewed-on: https://go-review.googlesource.com/c/go/+/407374 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/dist')
-rw-r--r--src/cmd/dist/test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 817ea4a7c5..677be336ac 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -1181,7 +1181,7 @@ func (t *tester) runHostTest(dir, pkg string) error {
if err := cmd.Run(); err != nil {
return err
}
- return t.dirCmd(dir, f.Name(), "-test.short="+short()).Run()
+ return t.dirCmd(dir, f.Name(), "-test.short="+short(), "-test.timeout="+t.timeoutDuration(300).String()).Run()
}
func (t *tester) cgoTest(dt *distTest) error {