mirror of
https://github.com/golang/go
synced 2024-11-17 00:24:48 -07:00
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>
This commit is contained in:
parent
34507e879d
commit
dd83fd8a70
2
src/cmd/dist/test.go
vendored
2
src/cmd/dist/test.go
vendored
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user