Re: [PATCH v2 1/4] t1517: skip svn tests if svn is not installed
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 1, 2026, 22:27 UTC
- Message-ID
- <xmqqzf0al51j.fsf@gitster.g>
- In-Reply-To
- <20260701212442.1430084-2-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 7 quoted lines
> +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.
Show 12 quoted lines
> 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