mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 22:13:39 +00:00
When running tests under wasmtime, provide a fresh TMPDIR.
Also fix a couple os tests that wrote to current directory to write to os.TempDir() instead. After this, os tests pass in wasi, so add them to the list run by "make tinygo-test-wasi".
This commit is contained in:
@@ -19,7 +19,7 @@ func randomName() string {
|
||||
}
|
||||
|
||||
func TestMkdir(t *testing.T) {
|
||||
dir := "TestMkdir" + randomName()
|
||||
dir := TempDir() + "/TestMkdir" + randomName()
|
||||
Remove(dir)
|
||||
err := Mkdir(dir, 0755)
|
||||
defer Remove(dir)
|
||||
@@ -65,7 +65,7 @@ func writeFile(t *testing.T, fname string, flag int, text string) string {
|
||||
}
|
||||
|
||||
func TestRemove(t *testing.T) {
|
||||
f := "TestRemove" + randomName()
|
||||
f := TempDir() + "/TestRemove" + randomName()
|
||||
|
||||
err := Remove(f)
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user