]> Cypherpunks repositories - gostls13.git/commit
cmd/go: make go test build multiple executables
authorMaksadbek Akhmedov <a.maksadbek@gmail.com>
Wed, 8 Feb 2023 13:58:04 +0000 (14:58 +0100)
committerGopher Robot <gobot@golang.org>
Mon, 27 Feb 2023 20:25:37 +0000 (20:25 +0000)
commitb611b3a8cc8c4cab3853853a135d5c29e807f513
treef24ecc77754899f78298e9445bcb03d33b7bfae3
parent1a5cf03b1bbf2f8a28a6c369871e1a61d74f1fb6
cmd/go: make go test build multiple executables

If -c is set while testing multiple packages, then allow
to build testing binary executables to the current directory
or to the directory that -o refers to.

$ go test -c -o /tmp ./pkg1 ./pkg2 ./pkg2
$ ls /tmp
pkg1.test pkg2.test pkg3.test

Fixes #15513.

Change-Id: I3aba01bebfa90e61e59276f2832d99c0d323b82e
Reviewed-on: https://go-review.googlesource.com/c/go/+/466397
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/go/internal/test/test.go
src/cmd/go/testdata/script/test_compile_multi_pkg.txt [new file with mode: 0644]