aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-01-17 16:14:05 -0800
committerGopher Robot <gobot@golang.org>2023-01-18 01:53:44 +0000
commitd449c01d125fa24ca8fc353eab674a973d237b85 (patch)
tree996c1da0a25256a8e5b661f3b3125521646495b9 /misc
parent198074abd7ec36ee71198a109d98f1ccdb7c5533 (diff)
downloadgo-d449c01d125fa24ca8fc353eab674a973d237b85.tar.xz
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 <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Bypass: Ian Lance Taylor <iant@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'misc')
-rw-r--r--misc/reboot/reboot_test.go12
1 files 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)