Unreviewed changes
8 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/cmd/internal/script/scripttest/run.go
Insertions: 4, Deletions: 8.
@@ -7,7 +7,6 @@
import (
"bytes"
- "cmd/internal/robustio"
"cmd/internal/script"
"context"
"fmt"
@@ -256,10 +255,10 @@
t.Fatal(err)
}
- // Call removeAll at the end of the test case in case
+ // Call fixPermissions at the end of the test case in case
// it uses the go modcache, which writes read-only files.
- // removeAll fixes up the permissions before removing the files.
- defer removeAll(t, workdir)
+ // fixPermissions fixes up the permissions so a later removal can succeed.
+ defer fixPermissions(t, workdir)
// Unpack archive.
a, err := txtar.ParseFile(file)
@@ -285,7 +284,7 @@
}
}
-func removeAll(t *testing.T, dir string) {
+func fixPermissions(t *testing.T, dir string) {
t.Helper()
// module cache has 0444 directories;
@@ -298,9 +297,6 @@
}
return nil
})
- if err := robustio.RemoveAll(dir); err != nil {
- t.Error(err)
- }
}
// InitScriptDirs sets up directories for executing a script test.
```
Change information
Commit message:
cmd/go: move part of gotoolchain_net to verylongtest
There is a case in gotoolchain_net that tries to download a real
GOTOOLCHAIN from the network. Move it to verylongtest so that it doesn't
affect the normal cmd/go test suite.
Also modify scripttest.RunTest to make files writable so that we can
clean up modcaches with readonly files.
For #80243
Change-Id: I3148fb07249358c7471dae7a7e1b97d76a6a6964
Files:
- M src/cmd/go/internal/verylongtest/script_test.go
- A src/cmd/go/internal/verylongtest/testdata/script/gotoolchain_net.txt
- M src/cmd/go/testdata/script/gotoolchain_net.txt
- M src/cmd/internal/script/scripttest/run.go
Change size: M
Delta: 4 files changed, 59 insertions(+), 23 deletions(-)
Branch: refs/heads/master