Skip to content

Commit a0bbdd6

Browse files
committed
internal/tests/deps: skip test if we can't run go command
For golang/go#64942 Change-Id: Idffad578d4bb766dd5c9d8d1a500b8f68598b664 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/553695 kokoro-CI: kokoro <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Bryan Mills <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
1 parent eb2fcc3 commit a0bbdd6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/tests/deps/cmd_pkgsite_deps_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import (
99
"os/exec"
1010
"strings"
1111
"testing"
12+
13+
"golang.org/x/pkgsite/internal/testenv"
1214
)
1315

1416
// non-test packages are allowed to depend on licensecheck and safehtml, x/ repos, and markdown.
@@ -30,6 +32,8 @@ var additionalAllowedTestModDeps = map[string]bool{
3032
}
3133

3234
func TestCmdPkgsiteDeps(t *testing.T) {
35+
testenv.MustHaveExecPath(t, "go")
36+
3337
// First, list all dependencies of pkgsite.
3438
out, err := exec.Command("go", "list", "-e", "-deps", "golang.org/x/pkgsite/cmd/pkgsite").Output()
3539
if err != nil {

0 commit comments

Comments
 (0)