mirror of
https://github.com/golang/go
synced 2024-11-17 12:54:47 -07:00
cmd/internal/goobj: use testenv.Command instead of exec.Command in tests
testenv.Command sets a default timeout based on the test's deadline and sends SIGQUIT (where supported) in case of a hang. Change-Id: I464dc34b50f3360123aca9e8666df9799c15e457 Reviewed-on: https://go-review.googlesource.com/c/go/+/450701 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
d703ad54bc
commit
40e1e2e93e
@ -11,7 +11,6 @@ import (
|
||||
"internal/buildcfg"
|
||||
"internal/testenv"
|
||||
"os"
|
||||
"os/exec"
|
||||
"testing"
|
||||
|
||||
"cmd/internal/bio"
|
||||
@ -125,7 +124,7 @@ func TestIssue41621LargeNumberOfRelocations(t *testing.T) {
|
||||
w.Reset()
|
||||
|
||||
// Build.
|
||||
cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", "large")
|
||||
cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-o", "large")
|
||||
cmd.Dir = tmpdir
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user