From: Ian Lance Taylor Date: Wed, 27 Feb 2019 00:50:31 +0000 (-0800) Subject: cmd/go: preserve more env vars for TestScript child processes X-Git-Tag: go1.13beta1~1351 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4a91d5501754f36dd09c23d99bbfa0bba37fe6f6;p=gostls13.git cmd/go: preserve more env vars for TestScript child processes These are required when testing gccgo. Change-Id: I6a81d7f4d48292c32a8b3b15ef44d859ab3aa26e Reviewed-on: https://go-review.googlesource.com/c/163861 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index 9cc2521e79..c5e0064036 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -83,7 +83,12 @@ type backgroundCmd struct { } var extraEnvKeys = []string{ - "SYSTEMROOT", // must be preserved on Windows to find DLLs; golang.org/issue/25210 + "SYSTEMROOT", // must be preserved on Windows to find DLLs; golang.org/issue/25210 + "LD_LIBRARY_PATH", // must be preserved on Unix systems to find shared libraries + "CC", // don't lose user settings when invoking cgo + "GO_TESTING_GOTOOLS", // for gccgo testing + "GCCGO", // for gccgo testing + "GCCGOTOOLDIR", // for gccgo testing } // setup sets up the test execution temporary directory and environment.