From f96157268cd4b34e3c6b84cda1b905a7c80796a7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 11 Jun 2018 11:45:24 -0700 Subject: [PATCH] imports: fix test to work with gccgo Change-Id: I382905b7b7bd8189c169048ba05080ee96e1da5b Reviewed-on: https://go-review.googlesource.com/117995 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- imports/fix_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/imports/fix_test.go b/imports/fix_test.go index 62c6f3c3..e2873008 100644 --- a/imports/fix_test.go +++ b/imports/fix_test.go @@ -1214,13 +1214,16 @@ func withEmptyGoPath(fn func()) { oldGOPATH := build.Default.GOPATH oldGOROOT := build.Default.GOROOT + oldCompiler := build.Default.Compiler build.Default.GOPATH = "" + build.Default.Compiler = "gc" testHookScanDir = func(string) {} defer func() { testHookScanDir = func(string) {} build.Default.GOPATH = oldGOPATH build.Default.GOROOT = oldGOROOT + build.Default.Compiler = oldCompiler }() fn()