]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/errors: fix TestPointerChecks when GO111MODULE=on
authorBryan C. Mills <bcmills@google.com>
Wed, 26 Jun 2019 19:25:16 +0000 (15:25 -0400)
committerBryan C. Mills <bcmills@google.com>
Wed, 26 Jun 2019 20:17:35 +0000 (20:17 +0000)
Change-Id: I4e9e46f03c9c43df1d0c6995f3baedd2e1a04c6a
Reviewed-on: https://go-review.googlesource.com/c/go/+/183985
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
misc/cgo/errors/ptr_test.go

index d1ef191bf545b43fa3ba120f7c1f4ffa440b45b4..42dfb92bd84e24189d3cacb6a82eba56900a120a 100644 (file)
@@ -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.)