...
Package testenv
Variables
Sigquit is the signal to send to kill a hanging subprocess.
Send SIGQUIT to get a stack trace.
var Sigquit = syscall.SIGQUIT
func Command(t testing.TB, name string, args ...string) *exec.Cmd
Command is like exec.Command, but applies the same changes as
testenv.CommandContext (with a default Context).
func CommandContext(t testing.TB, ctx context.Context, name string, args ...string) *exec.Cmd
CommandContext is like exec.CommandContext, but:
- skips t if the platform does not support os/exec,
- sends SIGQUIT (if supported by the platform) instead of SIGKILL
in its Cancel function
- if the test has a deadline, adds a Context timeout and WaitDelay
for an arbitrary grace period before the test's deadline expires,
- fails the test if the command does not complete before the test's deadline, and
- sets a Cleanup function that verifies that the test did not leak a subprocess.