]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: check for 'svn' binary in PATH in TestAccidentalGitCheckout
authorzikaeroh <zikaeroh@gmail.com>
Thu, 12 Mar 2020 00:17:57 +0000 (17:17 -0700)
committerBryan C. Mills <bcmills@google.com>
Fri, 13 Mar 2020 13:52:49 +0000 (13:52 +0000)
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 <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/go_test.go

index 66354f7ff5c44e0c6f296632ac94fe7c15407731..53027b7ccb4c402d5bc13429a1f1c13b1ee02129 100644 (file)
@@ -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()