]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: preserve more env vars for TestScript child processes
authorIan Lance Taylor <iant@golang.org>
Wed, 27 Feb 2019 00:50:31 +0000 (16:50 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 27 Feb 2019 04:34:51 +0000 (04:34 +0000)
These are required when testing gccgo.

Change-Id: I6a81d7f4d48292c32a8b3b15ef44d859ab3aa26e
Reviewed-on: https://go-review.googlesource.com/c/163861
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/script_test.go

index 9cc2521e7906e7968ac41d58a76a1fc920ae2153..c5e0064036784d97d4d3f7817a95e24649b8c796 100644 (file)
@@ -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.