]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime: use CleanCmdEnv in TestRuntimePanic
authorIan Lance Taylor <iant@golang.org>
Fri, 14 Sep 2018 17:04:12 +0000 (10:04 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 14 Sep 2018 19:45:53 +0000 (19:45 +0000)
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>
src/runtime/crash_test.go

index 2766b8850af33a0b4804cfb156166d8206caa4a1..6835cacb3f782753e94040d8bca4428ce3413982 100644 (file)
@@ -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)