Commit 619cc9fa authored by Ian Lance Taylor's avatar Ian Lance Taylor

go/internal/gccgoimporter: remove temporary directories in test

Updates #30500

Change-Id: I42716c2bfd7f087303bc63d7518e32b52fd0d762
Reviewed-on: https://go-review.googlesource.com/c/164862
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 412f6592
......@@ -143,17 +143,21 @@ func TestObjImporter(t *testing.T) {
}
t.Logf("gccgo version %d.%d", major, minor)
tmpdir, err := ioutil.TempDir("", "")
tmpdir, err := ioutil.TempDir("", "TestObjImporter")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpdir)
initmap := make(map[*types.Package]InitData)
imp := GetImporter([]string{tmpdir}, initmap)
artmpdir, err := ioutil.TempDir("", "")
artmpdir, err := ioutil.TempDir("", "TestObjImporter")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(artmpdir)
arinitmap := make(map[*types.Package]InitData)
arimp := GetImporter([]string{artmpdir}, arinitmap)
......@@ -198,8 +202,4 @@ func TestObjImporter(t *testing.T) {
t.Fatal(err)
}
}
if err = os.Remove(tmpdir); err != nil {
t.Fatal(err)
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment