mirror of
https://github.com/golang/go
synced 2024-09-28 18:14:29 -06:00
[release-branch.go1.9] cmd/dist: skip moved GOROOT on Go's Windows builders when not sharding tests
Change-Id: I0bcae339624e7d61037d9ea0885b7bd07491bbb6 Reviewed-on: https://go-review.googlesource.com/51430 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit 4833e920c1d7f6b23458e6ff3c73951fcf754219) Reviewed-on: https://go-review.googlesource.com/51450 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
65c6c88a94
commit
7320506bc5
11
src/cmd/dist/test.go
vendored
11
src/cmd/dist/test.go
vendored
@ -447,6 +447,17 @@ func (t *tester) registerTests() {
|
||||
t.runPending(dt)
|
||||
moved := t.goroot + "-moved"
|
||||
if err := os.Rename(t.goroot, moved); err != nil {
|
||||
if t.goos == "windows" {
|
||||
// Fails on Windows (with "Access is denied") if a process
|
||||
// or binary is in this directory. For instance, using all.bat
|
||||
// when run from c:\workdir\go\src fails here
|
||||
// if GO_BUILDER_NAME is set. Our builders invoke tests
|
||||
// a different way which happens to work when sharding
|
||||
// tests, but we should be tolerant of the non-sharded
|
||||
// all.bat case.
|
||||
log.Printf("skipping test on Windows")
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user