testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.
Change-Id: Ia1dd1bacfa2c9378401bbce304ebf7ee3f159352
Reviewed-on: https://go-review.googlesource.com/c/go/+/450707
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
"io"
"io/fs"
"os"
- "os/exec"
"path/filepath"
"strings"
"sync"
// doRun runs a program in a directory and returns the output.
func doRun(t *testing.T, dir string, args ...string) string {
- cmd := exec.Command(args[0], args[1:]...)
+ cmd := testenv.Command(t, args[0], args[1:]...)
cmd.Dir = dir
out, err := cmd.CombinedOutput()
if err != nil {