summaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/test/global_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/test/global_test.go')
-rw-r--r--src/cmd/compile/internal/test/global_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/test/global_test.go b/src/cmd/compile/internal/test/global_test.go
index 4862b90d44..2cf93dc4f7 100644
--- a/src/cmd/compile/internal/test/global_test.go
+++ b/src/cmd/compile/internal/test/global_test.go
@@ -8,7 +8,6 @@ import (
"bytes"
"internal/testenv"
"os"
- "os/exec"
"path/filepath"
"strings"
"testing"
@@ -46,14 +45,14 @@ func main() {
dst := filepath.Join(dir, "test")
// Compile source.
- cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", dst, src)
+ cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-o", dst, src)
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("could not build target: %v\n%s", err, out)
}
// Check destination to see if scanf code was included.
- cmd = exec.Command(testenv.GoToolPath(t), "tool", "nm", dst)
+ cmd = testenv.Command(t, testenv.GoToolPath(t), "tool", "nm", dst)
out, err = cmd.CombinedOutput()
if err != nil {
t.Fatalf("could not read target: %v", err)
@@ -91,7 +90,7 @@ func main() {
f.Close()
// Compile source.
- cmd := exec.Command(testenv.GoToolPath(t), "build", "-gcflags", "-S", "-o", filepath.Join(dir, "test"), src)
+ cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-gcflags", "-S", "-o", filepath.Join(dir, "test"), src)
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("could not build target: %v\n%s", err, out)