Fixes #69159
Change-Id: I0bbcf7075bdcf7a277a5053bcb543563a3074784
GitHub-Last-Rev:
86052a9ce32a871d6ad62f772f22852b2c6139a6
GitHub-Pull-Request: golang/go#69160
Reviewed-on: https://go-review.googlesource.com/c/go/+/609304
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
}
rel, err := filepath.Rel(oldDir, tmp)
if err != nil {
- t.Fatal(err)
+ // If GOROOT is on C: volume and tmp is on the D: volume, there
+ // is no relative path between them, so skip that test case.
+ rel = "skip"
}
for _, tc := range []struct {
},
} {
t.Run(tc.name, func(t *testing.T) {
+ if tc.dir == "skip" {
+ t.Skipf("skipping test because there is no relative path between %s and %s", oldDir, tmp)
+ }
if !filepath.IsAbs(tc.pwd) {
t.Fatalf("Bad tc.pwd: %q (must be absolute)", tc.pwd)
}