aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJess Frazelle <me@jessfraz.com>2017-07-20 12:29:15 -0400
committerIan Lance Taylor <iant@golang.org>2017-07-20 18:42:59 +0000
commitdc7fa5f6dbf1bc638d3c2b48ae394c6a2517d0ba (patch)
tree060708172055a13e2388a8cd88cd58f407be5c8d
parent37b7880d157111a796eda7f59ca73af7621489b8 (diff)
downloadgo-dc7fa5f6dbf1bc638d3c2b48ae394c6a2517d0ba.tar.gz
go-dc7fa5f6dbf1bc638d3c2b48ae394c6a2517d0ba.zip
cmd/go: fix test when go source tree has POSIX ACL
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>
-rw-r--r--src/cmd/go/go_unix_test.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cmd/go/go_unix_test.go b/src/cmd/go/go_unix_test.go
index c445a2ec73..f6e10ca59c 100644
--- a/src/cmd/go/go_unix_test.go
+++ b/src/cmd/go/go_unix_test.go
@@ -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)
}