]> Cypherpunks.ru repositories - gostls13.git/commitdiff
misc/reboot: overlay $GOROOT/lib in temporary goroot
authorIan Lance Taylor <iant@golang.org>
Wed, 18 Jan 2023 00:14:05 +0000 (16:14 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 18 Jan 2023 01:53:44 +0000 (01:53 +0000)
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>
misc/reboot/reboot_test.go

index a1b513b4324abfc2e6a1c0c48154d75919f2e663..c4a9f3ef9ff7d264d2133723beee89a889355bb4 100644 (file)
@@ -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)