diff options
author | Brandon Bennett <bbennett@fb.com> | 2022-02-04 12:45:18 -0700 |
---|---|---|
committer | Bryan Mills <bcmills@google.com> | 2022-02-04 20:50:14 +0000 |
commit | 2aafd9ea179ec308607c131dbda438abac2b9184 (patch) | |
tree | 9ea70a78af349363495cba096bec98c7a6f95971 /src/cmd/go/script_test.go | |
parent | 02224c8ce471b9618081c69d952fb8597f71b7e6 (diff) | |
download | go-2aafd9ea179ec308607c131dbda438abac2b9184.tar.gz go-2aafd9ea179ec308607c131dbda438abac2b9184.zip |
cmd/go: preserve LIBRARY_PATH and C_INCLUDE_PATH for script tests
In bespoke build environments default libraries may be specificied with
LIBRARY_PATH, C_INCLUDE_PATH enviroment variables to overide the system
(i.e glibc). Allow them though to allow cgo testing of these enviroments.
Fixes #50985
Change-Id: I7497a7715d9b635a6ae97efaab94a7ff01cdf8e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/383334
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Trust: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/go/script_test.go')
-rw-r--r-- | src/cmd/go/script_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index 722921f74c..55a88e0e0b 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -142,6 +142,8 @@ var extraEnvKeys = []string{ "SYSTEMROOT", // must be preserved on Windows to find DLLs; golang.org/issue/25210 "WINDIR", // must be preserved on Windows to be able to run PowerShell command; golang.org/issue/30711 "LD_LIBRARY_PATH", // must be preserved on Unix systems to find shared libraries + "LIBRARY_PATH", // allow override of non-standard static library paths + "C_INCLUDE_PATH", // allow override non-standard include paths "CC", // don't lose user settings when invoking cgo "GO_TESTING_GOTOOLS", // for gccgo testing "GCCGO", // for gccgo testing |