]> Cypherpunks repositories - gostls13.git/commit
cmd/{cover,go}: avoid use of os.PathListSeparator in cmd/cover flag
authorThan McIntosh <thanm@google.com>
Thu, 29 Sep 2022 13:19:38 +0000 (09:19 -0400)
committerThan McIntosh <thanm@google.com>
Thu, 29 Sep 2022 14:51:21 +0000 (14:51 +0000)
commit9861e8b2fd83dec24a6ced44998dca52abd6ccff
tree87bc32ee626f982e8e498b3dce10cbbc50512657
parente22af33b48447338abf6f788b3eb5b87577f95db
cmd/{cover,go}: avoid use of os.PathListSeparator in cmd/cover flag

Rework the mechanism for passing a list of output files from cmd/go to
cmd/cover when running new-style package-scope coverage
instrumentation (-pkgcfg mode). The old scheme passed a single string
with all output files joined together with os.PathListSeparator, but
this scheme is not viable on plan9, where strings containing the
separator character are not permitted when running exec.Command().
Instead, switch cmd/cover to use an arguments file (a file containing
a list of names) to specify names of instrumented output files. This
fixes the cmd/cover test failures on the plan9 builders.

Updates #51430.

Change-Id: I919f5e0a79500e28648fb9177225a9b938e4fdee
Reviewed-on: https://go-review.googlesource.com/c/go/+/436675
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
src/cmd/cover/cfg_test.go
src/cmd/cover/cover.go
src/cmd/go/internal/work/exec.go