summaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/debug_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/ssa/debug_test.go')
-rw-r--r--src/cmd/compile/internal/ssa/debug_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cmd/compile/internal/ssa/debug_test.go b/src/cmd/compile/internal/ssa/debug_test.go
index af32ba7047..094d1a9340 100644
--- a/src/cmd/compile/internal/ssa/debug_test.go
+++ b/src/cmd/compile/internal/ssa/debug_test.go
@@ -244,9 +244,9 @@ func testNexting(t *testing.T, base, tag, gcflags string, count int, moreArgs ..
tmplog := tmpbase + ".nexts"
var dbg dbgr
if *useGdb {
- dbg = newGdb(tag, exe)
+ dbg = newGdb(t, tag, exe)
} else {
- dbg = newDelve(tag, exe)
+ dbg = newDelve(t, tag, exe)
}
h1 := runDbgr(dbg, count)
if *dryrun {
@@ -261,7 +261,7 @@ func testNexting(t *testing.T, base, tag, gcflags string, count int, moreArgs ..
if !h0.equals(h1) {
// Be very noisy about exactly what's wrong to simplify debugging.
h1.write(tmplog)
- cmd := exec.Command("diff", "-u", nextlog, tmplog)
+ cmd := testenv.Command(t, "diff", "-u", nextlog, tmplog)
line := asCommandLine("", cmd)
bytes, err := cmd.CombinedOutput()
if err != nil && len(bytes) == 0 {
@@ -297,7 +297,7 @@ func runDbgr(dbg dbgr, maxNext int) *nextHist {
func runGo(t *testing.T, dir string, args ...string) string {
var stdout, stderr strings.Builder
- cmd := exec.Command(testenv.GoToolPath(t), args...)
+ cmd := testenv.Command(t, testenv.GoToolPath(t), args...)
cmd.Dir = dir
if *dryrun {
fmt.Printf("%s\n", asCommandLine("", cmd))
@@ -501,8 +501,8 @@ type delveState struct {
function string
}
-func newDelve(tag, executable string, args ...string) dbgr {
- cmd := exec.Command("dlv", "exec", executable)
+func newDelve(t testing.TB, tag, executable string, args ...string) dbgr {
+ cmd := testenv.Command(t, "dlv", "exec", executable)
cmd.Env = replaceEnv(cmd.Env, "TERM", "dumb")
if len(args) > 0 {
cmd.Args = append(cmd.Args, "--")
@@ -586,9 +586,9 @@ type gdbState struct {
function string
}
-func newGdb(tag, executable string, args ...string) dbgr {
+func newGdb(t testing.TB, tag, executable string, args ...string) dbgr {
// Turn off shell, necessary for Darwin apparently
- cmd := exec.Command(gdb, "-nx",
+ cmd := testenv.Command(t, gdb, "-nx",
"-iex", fmt.Sprintf("add-auto-load-safe-path %s/src/runtime", runtime.GOROOT()),
"-ex", "set startup-with-shell off", executable)
cmd.Env = replaceEnv(cmd.Env, "TERM", "dumb")