mirror of https://github.com/golang/go.git
cmd/vet: fix test's dependence on perl
Change-Id: I774dbd4f90ef271a0969c3c8e65d145669312e3e Reviewed-on: https://go-review.googlesource.com/22745 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ross Light <light@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
b64c7fc683
commit
4d5ac10f69
|
|
@ -34,6 +34,9 @@ func MustHavePerl(t *testing.T) {
|
|||
case "plan9", "windows":
|
||||
t.Skipf("skipping test: perl not available on %s", runtime.GOOS)
|
||||
}
|
||||
if _, err := exec.LookPath("perl"); err != nil {
|
||||
t.Skipf("skipping test: perl not found in path")
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -42,11 +45,11 @@ var (
|
|||
)
|
||||
|
||||
func Build(t *testing.T) {
|
||||
testenv.MustHaveGoBuild(t)
|
||||
MustHavePerl(t)
|
||||
if built {
|
||||
return
|
||||
}
|
||||
testenv.MustHaveGoBuild(t)
|
||||
MustHavePerl(t)
|
||||
if failed {
|
||||
t.Skip("cannot run on this environment")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue