all: skip tests if required tools are not found
Fixes golang/go#33950
Change-Id: Iefcb757e773bc052793611c099c25a457fd7e243
Reviewed-on: https://go-review.googlesource.com/c/tools/+/192400
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
diff --git a/cmd/callgraph/main_test.go b/cmd/callgraph/main_test.go
index 54953c7..6aeae6f 100644
--- a/cmd/callgraph/main_test.go
+++ b/cmd/callgraph/main_test.go
@@ -17,6 +17,8 @@
"path/filepath"
"strings"
"testing"
+
+ "golang.org/x/tools/internal/testenv"
)
func init() {
@@ -32,6 +34,8 @@
}
func TestCallgraph(t *testing.T) {
+ testenv.NeedsTool(t, "go")
+
gopath, err := filepath.Abs("testdata")
if err != nil {
t.Fatal(err)