From c6bcdeafd2a2f11373dec9a82fccc75d332cd0cc Mon Sep 17 00:00:00 2001 From: zikaeroh Date: Wed, 11 Mar 2020 17:17:57 -0700 Subject: [PATCH] cmd/go: check for 'svn' binary in PATH in TestAccidentalGitCheckout This test requires subversion to run, but does not check to see if it's available before running as it does for git. Call testenv.MustHaveExecPath to check beforehand to allow the test to be skipped if the svn binary does not exist. Change-Id: I16ae104621b221fc6e96f6c7dcd71bf406caa0c5 Reviewed-on: https://go-review.googlesource.com/c/go/+/223082 Reviewed-by: Bryan C. Mills Run-TryBot: Bryan C. Mills TryBot-Result: Gobot Gobot --- src/cmd/go/go_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 66354f7ff5..53027b7ccb 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -1044,6 +1044,7 @@ func TestGetGitDefaultBranch(t *testing.T) { func TestAccidentalGitCheckout(t *testing.T) { testenv.MustHaveExternalNetwork(t) testenv.MustHaveExecPath(t, "git") + testenv.MustHaveExecPath(t, "svn") tg := testgo(t) defer tg.cleanup()