Skip to content

Commit

Permalink
all: set GO111MODULE=off explicitly in bind tests
Browse files Browse the repository at this point in the history
Updates golang/go#27234
Updates golang/go#30228

Change-Id: Ibe281480398ff9d8c27657f399159885a75f646e
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/167179
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
Bryan C. Mills authored and bradfitz committed Mar 13, 2019
1 parent d3739f8 commit f0d57f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bind/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func genObjcPackages(t *testing.T, dir string, cg *ObjcWrapper) {
"-pkgdir="+filepath.Join(dir, "pkg", build.Default.GOOS+"_"+build.Default.GOARCH),
"ObjC/...",
)
cmd.Env = append(os.Environ(), "GOPATH="+dir)
cmd.Env = append(os.Environ(), "GOPATH="+dir, "GO111MODULE=off")
if out, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("failed to go install the generated ObjC wrappers: %v: %s", err, string(out))
}
Expand Down Expand Up @@ -272,7 +272,7 @@ func genJavaPackages(t *testing.T, dir string, cg *ClassGen) {
"-pkgdir="+filepath.Join(dir, "pkg", build.Default.GOOS+"_"+build.Default.GOARCH),
"Java/...",
)
cmd.Env = append(os.Environ(), "GOPATH="+dir)
cmd.Env = append(os.Environ(), "GOPATH="+dir, "GO111MODULE=off")
if out, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("failed to go install the generated Java wrappers: %v: %s", err, string(out))
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/gobind/gobind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ func runGobind(t testing.TB, lang, pkg, goos string) error {
cmd := exec.Command(gobindBin, "-lang", lang, pkg)
if goos != "" {
cmd.Env = append(os.Environ(), "GOOS="+goos)
cmd.Env = append(os.Environ(), "CGO_ENABLED=1")
cmd.Env = append(cmd.Env, "CGO_ENABLED=1")
cmd.Env = append(cmd.Env, "GO111MODULE=off")
}
if out, err := cmd.CombinedOutput(); err != nil {
return fmt.Errorf("gobind -lang %s %s failed: %v: %s", lang, pkg, err, out)
Expand Down

0 comments on commit f0d57f4

Please sign in to comment.