From 7c767fd709febcc6deb00751786799c4639f8696 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 12 Jul 2015 10:18:32 -0700 Subject: [PATCH] misc/cgo/testshared: unset GOBIN during test Fixes #11273. Change-Id: I409b6c4168711913076439036d65e8639ca3b06f Reviewed-on: https://go-review.googlesource.com/12073 Reviewed-by: Brad Fitzpatrick --- misc/cgo/testshared/shared_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/cgo/testshared/shared_test.go b/misc/cgo/testshared/shared_test.go index 232ca3394a..6ef448c4f2 100644 --- a/misc/cgo/testshared/shared_test.go +++ b/misc/cgo/testshared/shared_test.go @@ -143,6 +143,10 @@ func testMain(m *testing.M) (int, error) { } func TestMain(m *testing.M) { + // Some of the tests install binaries into a custom GOPATH. + // That won't work if GOBIN is set. + os.Unsetenv("GOBIN") + flag.Parse() exitCode, err := testMain(m) if err != nil { -- 2.48.1