mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
This lifts the logic to run a subcommand with a timeout in a test from the runtime's runTestProg into testenv. The implementation is unchanged in this CL. We'll improve it in a future CL. Currently, tests that run subcommands usually just timeout with no useful output if the subcommand runs for too long. This is a step toward improving this. For #37405. Change-Id: I2298770db516e216379c4c438e05d23cbbdda51d Reviewed-on: https://go-review.googlesource.com/c/go/+/370701 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
13 lines
386 B
Go
13 lines
386 B
Go
// Copyright 2021 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build windows || plan9 || (js && wasm)
|
|
|
|
package testenv
|
|
|
|
import "os"
|
|
|
|
// Sigquit is the signal to send to kill a hanging subprocess.
|
|
// On Unix we send SIGQUIT, but on non-Unix we only have os.Kill.
|
|
var Sigquit = os.Kill
|