Skip to content

Commit

Permalink
runtime: use CleanCmdEnv in TestRuntimePanic
Browse files Browse the repository at this point in the history
This makes TestRuntimePanic keep most of the existing environment,
just as the other runtime tests do.

Change-Id: I7944abfeee292d41716dca14483134a50d75f081
Reviewed-on: https://go-review.googlesource.com/135376
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
ianlancetaylor committed Sep 14, 2018
1 parent b1f656b commit 0e21cc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/crash_test.go
Expand Up @@ -686,7 +686,7 @@ func init() {

func TestRuntimePanic(t *testing.T) {
testenv.MustHaveExec(t)
cmd := exec.Command(os.Args[0], "-test.run=TestRuntimePanic")
cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=TestRuntimePanic"))
cmd.Env = append(cmd.Env, "GO_TEST_RUNTIME_PANIC=1")
out, err := cmd.CombinedOutput()
t.Logf("%s", out)
Expand Down

0 comments on commit 0e21cc2

Please sign in to comment.