From d449c01d125fa24ca8fc353eab674a973d237b85 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 17 Jan 2023 16:14:05 -0800 Subject: [PATCH] misc/reboot: overlay $GOROOT/lib in temporary goroot This fixes the test after CL 455357, which builds the time/tzdata file from $GOROOT/lib/time/zoneinfo.zip. Change-Id: I0c5afa6521b58dd3b57c3b4c3c704a622b846382 Reviewed-on: https://go-review.googlesource.com/c/go/+/462279 Run-TryBot: Ian Lance Taylor Reviewed-by: Cherry Mui Reviewed-by: Dmitri Shuralyov Auto-Submit: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov TryBot-Bypass: Ian Lance Taylor Reviewed-by: Than McIntosh --- misc/reboot/reboot_test.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/misc/reboot/reboot_test.go b/misc/reboot/reboot_test.go index a1b513b432..c4a9f3ef9f 100644 --- a/misc/reboot/reboot_test.go +++ b/misc/reboot/reboot_test.go @@ -36,14 +36,22 @@ func TestRepeatBootstrap(t *testing.T) { if err := os.Mkdir(dotGit, 000); err != nil { t.Fatal(err) } + + overlayStart := time.Now() + goroot := filepath.Join(parent, "goroot") gorootSrc := filepath.Join(goroot, "src") - overlayStart := time.Now() if err := overlayDir(gorootSrc, filepath.Join(realGoroot, "src")); err != nil { t.Fatal(err) } - t.Logf("GOROOT/src overlay set up in %s", time.Since(overlayStart)) + + gorootLib := filepath.Join(goroot, "lib") + if err := overlayDir(gorootLib, filepath.Join(realGoroot, "lib")); err != nil { + t.Fatal(err) + } + + t.Logf("GOROOT overlay set up in %s", time.Since(overlayStart)) if err := os.WriteFile(filepath.Join(goroot, "VERSION"), []byte(runtime.Version()), 0666); err != nil { t.Fatal(err) -- 2.50.0