Re: [PATCH v2 1/4] t1517: skip svn tests if svn is not installed
From: Junio C Hamano <hidden>
Date: 2026-07-01 22:27:07
"brian m. carlson" [off-list ref] writes:
+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); + " +'
If "have_prereq PERL" is not satisfied, SVN is not satisfied. If NO_SVN_TESTS is an empty string (or unset), "test -n" fails, and SVN is not satisfied. Questionable---am I misreading this part of the logic??? The perl script would not barf only if use SVN::* succeed and then SVN::Core::VERSION is strictly better than '1.1.0'. If not, i.e., libsvn-perl is not available, or its version is older, then we fail with exit(42), and SVN is not satisfied.
quoted hunk ↗ jump to hunk
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