From: Bryan C. Mills Date: Wed, 26 Jun 2019 19:25:16 +0000 (-0400) Subject: misc/cgo/errors: fix TestPointerChecks when GO111MODULE=on X-Git-Tag: go1.13rc1~148 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9acd2d60e76649663a1e64b1ad00d2173c68c5fe;p=gostls13.git misc/cgo/errors: fix TestPointerChecks when GO111MODULE=on Change-Id: I4e9e46f03c9c43df1d0c6995f3baedd2e1a04c6a Reviewed-on: https://go-review.googlesource.com/c/go/+/183985 Run-TryBot: Bryan C. Mills TryBot-Result: Gobot Gobot Reviewed-by: Jay Conrod --- diff --git a/misc/cgo/errors/ptr_test.go b/misc/cgo/errors/ptr_test.go index d1ef191bf5..42dfb92bd8 100644 --- a/misc/cgo/errors/ptr_test.go +++ b/misc/cgo/errors/ptr_test.go @@ -466,6 +466,9 @@ func buildPtrTests(t *testing.T) (dir, exe string) { if err := os.MkdirAll(src, 0777); err != nil { t.Fatal(err) } + if err := ioutil.WriteFile(filepath.Join(src, "go.mod"), []byte("module ptrtest"), 0666); err != nil { + t.Fatal(err) + } // Prepare two cgo inputs: one for standard cgo and one for //export cgo. // (The latter cannot have C definitions, only declarations.)