Commit 4d5ac10f authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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: 's avatarRoss Light <light@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent b64c7fc6
...@@ -34,6 +34,9 @@ func MustHavePerl(t *testing.T) { ...@@ -34,6 +34,9 @@ func MustHavePerl(t *testing.T) {
case "plan9", "windows": case "plan9", "windows":
t.Skipf("skipping test: perl not available on %s", runtime.GOOS) 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 ( var (
...@@ -42,11 +45,11 @@ var ( ...@@ -42,11 +45,11 @@ var (
) )
func Build(t *testing.T) { func Build(t *testing.T) {
testenv.MustHaveGoBuild(t)
MustHavePerl(t)
if built { if built {
return return
} }
testenv.MustHaveGoBuild(t)
MustHavePerl(t)
if failed { if failed {
t.Skip("cannot run on this environment") t.Skip("cannot run on this environment")
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment