summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/go/testdata/script/install_cross_gobin.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/cmd/go/testdata/script/install_cross_gobin.txt')
-rw-r--r--libgo/go/cmd/go/testdata/script/install_cross_gobin.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/libgo/go/cmd/go/testdata/script/install_cross_gobin.txt b/libgo/go/cmd/go/testdata/script/install_cross_gobin.txt
new file mode 100644
index 00000000000..f85e896f61e
--- /dev/null
+++ b/libgo/go/cmd/go/testdata/script/install_cross_gobin.txt
@@ -0,0 +1,25 @@
+cd mycmd
+go build mycmd
+
+[gccgo] stop
+
+# cross-compile install with implicit GOBIN=$GOPATH/bin can make subdirectory
+env GOARCH=386
+[386] env GOARCH=amd64
+env GOOS=linux
+go install mycmd
+exists $GOPATH/bin/linux_$GOARCH/mycmd
+
+# cross-compile install with explicit GOBIN cannot make subdirectory
+env GOBIN=$WORK/bin
+! go install mycmd
+! exists $GOBIN/linux_$GOARCH
+
+# installing standard command should still work
+# (should also be mtime update only if cmd/pack is up-to-date).
+! stale cmd/pack
+[!short] go install cmd/pack
+
+-- mycmd/x.go --
+package main
+func main() {}