mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall: use MustHaveExec in TestExec
For #41702 Change-Id: Ib2b15e52aa1fef2f5e644b316c726150252fa9f8 Reviewed-on: https://go-review.googlesource.com/c/go/+/262738 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
a2eb53c571
commit
11cfb48df1
1 changed files with 1 additions and 0 deletions
|
|
@ -247,6 +247,7 @@ func TestInvalidExec(t *testing.T) {
|
||||||
|
|
||||||
// TestExec is for issue #41702.
|
// TestExec is for issue #41702.
|
||||||
func TestExec(t *testing.T) {
|
func TestExec(t *testing.T) {
|
||||||
|
testenv.MustHaveExec(t)
|
||||||
cmd := exec.Command(os.Args[0], "-test.run=TestExecHelper")
|
cmd := exec.Command(os.Args[0], "-test.run=TestExecHelper")
|
||||||
cmd.Env = append(os.Environ(), "GO_WANT_HELPER_PROCESS=2")
|
cmd.Env = append(os.Environ(), "GO_WANT_HELPER_PROCESS=2")
|
||||||
o, err := cmd.CombinedOutput()
|
o, err := cmd.CombinedOutput()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue