aboutsummaryrefslogtreecommitdiff
path: root/imports
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2018-06-11 11:45:24 -0700
committerIan Lance Taylor <iant@golang.org>2018-06-11 19:17:03 +0000
commitf96157268cd4b34e3c6b84cda1b905a7c80796a7 (patch)
tree8ba40f7c8ec335e3d4421494012b2d0f5e6c74b1 /imports
parentc65208ee29128450a4a024e3b7710f3a8d14028d (diff)
downloadgolang-x-tools-f96157268cd4b34e3c6b84cda1b905a7c80796a7.tar.gz
imports: fix test to work with gccgo
Change-Id: I382905b7b7bd8189c169048ba05080ee96e1da5b Reviewed-on: https://go-review.googlesource.com/117995 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'imports')
-rw-r--r--imports/fix_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/imports/fix_test.go b/imports/fix_test.go
index 62c6f3c32..e2873008c 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()