Skip to content

Commit

Permalink
cmd/go: fix test when go source tree has POSIX ACL
Browse files Browse the repository at this point in the history
Fixes TestGoBuildUmask when the user has a POSIX ACL on the Go source tree.

Fixes #17909.

Change-Id: I5bc19099af8353afd41071258f4f317612b4c8c1
Reviewed-on: https://go-review.googlesource.com/50370
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
  • Loading branch information
jessfraz authored and ianlancetaylor committed Jul 20, 2017
1 parent 37b7880 commit dc7fa5f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/cmd/go/go_unix_test.go
Expand Up @@ -19,9 +19,13 @@ func TestGoBuildUmask(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
tg.tempFile("x.go", `package main; func main() {}`)
tg.creatingTemp("x")
tg.run("build", tg.path("x.go"))
fi, err := os.Stat("x")
// Make sure artifact will be output to /tmp/... in case the user
// has POSIX acl's on their go source tree.
// See issue 17909.
exe := tg.path("x")
tg.creatingTemp(exe)
tg.run("build", "-o", exe, tg.path("x.go"))
fi, err := os.Stat(exe)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit dc7fa5f

Please sign in to comment.