From a1f3dc33dced2d337261b693b1ef1bf6a5bbce8d Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Mon, 22 May 2023 10:32:31 -0400 Subject: cmd/cgo: merge overlayDir into one package There are many copies of overlaydir_test.go between the cgo tests from when these couldn't share code. Now that they can, merge these copies into a cmd/cgo/internal/cgotest package. Change-Id: I203217f5d08e6306cb049a13718652cf7c447b80 Reviewed-on: https://go-review.googlesource.com/c/go/+/497078 Run-TryBot: Austin Clements Reviewed-by: Bryan Mills TryBot-Result: Gopher Robot --- src/cmd/cgo/internal/testplugin/plugin_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cmd/cgo/internal/testplugin/plugin_test.go') diff --git a/src/cmd/cgo/internal/testplugin/plugin_test.go b/src/cmd/cgo/internal/testplugin/plugin_test.go index e211a96304..4c8e3d7833 100644 --- a/src/cmd/cgo/internal/testplugin/plugin_test.go +++ b/src/cmd/cgo/internal/testplugin/plugin_test.go @@ -6,6 +6,7 @@ package plugin_test import ( "bytes" + "cmd/cgo/internal/cgotest" "context" "flag" "fmt" @@ -80,7 +81,7 @@ func testMain(m *testing.M) int { "testdata": modRoot, filepath.Join("altpath", "testdata"): altRoot, } { - if err := overlayDir(dstRoot, srcRoot); err != nil { + if err := cgotest.OverlayDir(dstRoot, srcRoot); err != nil { log.Panic(err) } prettyPrintf("mkdir -p %s\n", dstRoot) -- cgit v1.3