go/go
Bryan C. Mills 932ec22a59 internal/testenv: add a Command function that replaces exec.Command
The function is derived from the testenv.Command function in the main
repo as of CL 446875, with a couple of modifications to allow it to
build (with more limited functionality) with Go versions as old as
1.16 (currently needed in order to test gopls with such versions).

testenv.Command sets up an exec.Cmd with more useful termination
behavior in the context of a test: namely, it is terminated with
SIGQUIT (to get a goroutine dump from the subprocess) shortly before
the test would otherwise time out.

Assuming that the test logs the output from the command appropriately,
this should make deadlocks and unexpectedly slow operations easier to
diagnose in the builders.

For golang/go#50014.
Updates golang/go#50436.

Change-Id: I872d4b24e63951bf9b7811189e672973d366fb78
Reviewed-on: https://go-review.googlesource.com/c/tools/+/377835
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
2022-11-21 16:54:26 +00:00
..
analysis internal/testenv: add a Command function that replaces exec.Command 2022-11-21 16:54:26 +00:00
ast all: use constant to avoid repeated definitions 2022-09-19 15:32:23 +00:00
buildutil all: fix a few function names on comments 2022-10-10 13:22:38 +00:00
callgraph go/ssa: build generic function bodies 2022-11-18 18:55:10 +00:00
cfg all: gofmt 2022-04-12 17:53:17 +00:00
expect all: gofmt 2022-04-12 17:53:17 +00:00
gccgoexportdata all: gofmt 2022-04-12 17:53:17 +00:00
gcexportdata internal/testenv: skip tests that need export data for std if 'go tool compile' does not exist 2022-11-17 20:46:33 +00:00
internal internal/gcimporter: moved from go/internal/gcimporter 2022-11-04 15:23:56 +00:00
loader all: gofmt 2022-04-12 17:53:17 +00:00
packages internal/testenv: skip tests that need export data for std if 'go tool compile' does not exist 2022-11-17 20:46:33 +00:00
pointer go/ssa: build generic function bodies 2022-11-18 18:55:10 +00:00
ssa go/ssa: build generic function bodies 2022-11-18 18:55:10 +00:00
types go/types/typeutil: break recursion through anonymous interfaces 2022-10-28 20:13:59 +00:00
vcs all: gofmt 2022-04-12 17:53:17 +00:00