mirror of
https://github.com/golang/go
synced 2024-11-19 03:44:40 -07:00
cmd/go: leave directory before removing it in TestSharedLibName
Fixes #15124 Change-Id: I55fe4c2957370f3fb417c3df54f99fb085a5dada Reviewed-on: https://go-review.googlesource.com/21522 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
31f2bb4ba2
commit
bbbd572c10
@ -161,9 +161,12 @@ func TestSharedLibName(t *testing.T) {
|
||||
}
|
||||
oldGopath := buildContext.GOPATH
|
||||
defer func() {
|
||||
os.RemoveAll(tmpGopath)
|
||||
buildContext.GOPATH = oldGopath
|
||||
os.Chdir(cwd)
|
||||
err := os.RemoveAll(tmpGopath)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}()
|
||||
root := filepath.Join(tmpGopath, "src", data.rootedAt)
|
||||
err = os.MkdirAll(root, 0755)
|
||||
|
Loading…
Reference in New Issue
Block a user