[PATCH v2 1/4] t1517: skip svn tests if svn is not installed
From: brian m. carlson <hidden>
Date: 2026-07-01 21:24:53
Subsystem:
the rest · Maintainer:
Linus Torvalds
The svn tests currently assume that git-svn's option parsing will always fail the tests because it exits 0 on --help, not 129. However, in a future commit, we'll expect it to exit 0 and the tests will then need to be updated to succeed in some cases and fail in others. We therefore need to have t1517 determine whether the Subversion Perl modules are present, since if they are not, git-svn will die on start and then it needs to continue to expect failure. Add a stripped down version of the tests in t/lib-git-svn.sh as a prerequisite we can use here for our svn tests. Signed-off-by: brian m. carlson <redacted> --- t/t1517-outside-repo.sh | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index c557f2f55c..583784f21b 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh@@ -4,6 +4,14 @@ test_description='check random commands outside repo' . ./test-lib.sh +test_lazy_prereq SVN ' + test_have_prereq PERL && test -n "$NO_SVN_TESTS" && perl -w -e " + use SVN::Core; + use SVN::Repos; + \$SVN::Core::VERSION gt '1.1.0' or exit(42); + " +' + test_expect_success 'set up a non-repo directory and test file' ' GIT_CEILING_DIRECTORIES=$(pwd) && export GIT_CEILING_DIRECTORIES &&
@@ -138,6 +146,8 @@ do case "$cmd" in instaweb) prereq=PERL ;; + svn) + prereq=SVN ;; *) prereq= ;; esac