mirror of
https://github.com/golang/go
synced 2024-09-15 14:10:17 +00:00
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>
This commit is contained in:
parent
198074abd7
commit
d449c01d12
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue