go/cmd
Bryan C. Mills b978661c6c cmd/godoc: streamline test subprocesses
- Use testenv.Command to obtain Cmd instances that terminate (with
  useful goroutine dumps!) before the test's timeout, and remove
  arbitrary hard-coded timeouts.

- Execute the test binary itself as cmd/godoc instead of invoking (and
  cleaning up after) 'go build'.

- Use context cancellation to reduce the number of ad-hoc goroutines
  and channels needed by the tests and to provide stronger invariants
  on process cleanup.

For golang/go#50014

Change-Id: I19ae4d10da691db233c79734799ae074ffdf6a03
Reviewed-on: https://go-review.googlesource.com/c/tools/+/377836
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
2022-11-21 16:55:09 +00:00
..
auth cmd/auth/cookieauth: delete unreachable os.Exit 2022-07-25 18:11:01 +00:00
benchcmp cmd: gofmt 2022-04-12 17:38:38 +00:00
bundle cmd/bundle: quote command-line arguments in output 2022-10-26 18:58:11 +00:00
callgraph cmd/callgraph: add test of -algo=vta 2022-06-02 22:22:06 +00:00
compilebench cmd/compilebench: make it work without installed .a's 2022-11-10 18:37:12 +00:00
cover cmd: gofmt 2022-04-12 17:38:38 +00:00
digraph cmd/digraph: fix typo 2022-06-25 13:13:44 +00:00
eg cmd: avoid printing redundant newlines 2021-11-08 18:39:25 +00:00
file2fuzz cmd: gofmt 2022-04-12 17:38:38 +00:00
fiximports cmd: gofmt 2022-04-12 17:38:38 +00:00
getgo cmd/getgo: exec main from TestMain instead of running 'go build' in tests 2022-03-04 20:37:47 +00:00
go-contrib-init all: replace all usages of os/exec with golang.org/x/sys/execabs 2021-01-19 22:25:03 +00:00
godex cmd: gofmt 2022-04-12 17:38:38 +00:00
godoc cmd/godoc: streamline test subprocesses 2022-11-21 16:55:09 +00:00
goimports cmd: gofmt 2022-04-12 17:38:38 +00:00
gomvpkg cmd: avoid printing redundant newlines 2021-11-08 18:39:25 +00:00
gorename cmd: gofmt 2022-04-12 17:38:38 +00:00
gotype cmd: gofmt 2022-04-12 17:38:38 +00:00
goyacc cmd: gofmt 2022-04-12 17:38:38 +00:00
guru all: fix a few function names on comments 2022-10-10 13:22:38 +00:00
html2article copyright: test that all files in the repo have copyright notices 2021-01-11 22:19:46 +00:00
present cmd: gofmt 2022-04-12 17:38:38 +00:00
present2md cmd: gofmt 2022-04-12 17:38:38 +00:00
signature-fuzzer cmd: gofmt 2022-04-12 17:38:38 +00:00
splitdwarf all: remove redundant type conversion 2022-09-07 17:33:19 +00:00
ssadump cmd/ssadump: disable run mode with runtime package 2022-10-11 20:40:41 +00:00
stress cmd: gofmt 2022-04-12 17:38:38 +00:00
stringer cmd/stringer: replace ioutil with os 2022-11-11 15:19:20 +00:00
toolstash all: replace deprecated egrep with grep -E 2022-09-23 13:31:09 +00:00