From: Ian Lance Taylor Date: Fri, 14 Sep 2018 17:04:12 +0000 (-0700) Subject: runtime: use CleanCmdEnv in TestRuntimePanic X-Git-Tag: go1.12beta1~1087 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0e21cc2ba0823f2130d950eccf7c023b161d1331;p=gostls13.git runtime: use CleanCmdEnv in TestRuntimePanic 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index 2766b8850a..6835cacb3f 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -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)