1
0
mirror of https://github.com/golang/go synced 2024-11-20 06:24:40 -07:00

os/exec: fix -test.run argument for new 'go test'

In 'go test' I deleted the leading package. prefix
from all the test names, since it contained no actual
information.  Adjust the -test.run argument accordingly.
This will still work with the current gotest too, since
the argument is an unanchored pattern.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5491058
This commit is contained in:
Russ Cox 2011-12-15 18:21:38 -05:00
parent f99b412813
commit b53856c16d

View File

@ -18,7 +18,7 @@ import (
) )
func helperCommand(s ...string) *Cmd { func helperCommand(s ...string) *Cmd {
cs := []string{"-test.run=exec.TestHelperProcess", "--"} cs := []string{"-test.run=TestHelperProcess", "--"}
cs = append(cs, s...) cs = append(cs, s...)
cmd := Command(os.Args[0], cs...) cmd := Command(os.Args[0], cs...)
cmd.Env = append([]string{"GO_WANT_HELPER_PROCESS=1"}, os.Environ()...) cmd.Env = append([]string{"GO_WANT_HELPER_PROCESS=1"}, os.Environ()...)