git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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:10 UTC
Message-ID
<xmqq8q7umkcy.fsf@gitster.g>
In-Reply-To
<20260701212442.1430084-2-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 31 quoted lines
> 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 <sandals@crustytoothpaste.net>
> ---
>  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);
> +	"
> +'

This corresponds to 42 in t/lib-git-svn.sh? We can use any non-zero value here, but just being curious.

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
Previous: brian m. carlsonNext: Junio C Hamano
Message 19 of 39 in “Unexpected exit code for --help with rev-parse --parseopt”
  1. brian m. carlsonMar 15, 2026
  2. Jeff KingMar 15, 2026
  3. brian m. carlsonMar 15, 2026
  4. Jeff KingMar 15, 2026
  5. rev-parse: have --parseopt callers exit 0 on --helpbrian m. carlson, Mar 16, 2026
  6. Junio C HamanoMar 17, 2026
  7. brian m. carlsonMar 17, 2026
  8. Jeff KingMar 17, 2026
  9. Jeff KingMar 17, 2026
  10. Junio C HamanoMar 17, 2026
  11. Jeff KingMar 17, 2026
  12. brian m. carlsonMar 18, 2026
  13. Jeff KingMar 18, 2026
  14. Junio C HamanoMar 18, 2026
  15. 0/4 rev-parse: exit 0 on --helpbrian m. carlson, Jul 1, 2026
  16. 3/4 rev-parse: have --parseopt callers exit 0 on --helpbrian m. carlson, Jul 1, 2026
  17. Junio C HamanoJul 1, 2026
  18. 1/4 t1517: skip svn tests if svn is not installedbrian m. carlson, Jul 1, 2026
  19. Junio C HamanoJul 1, 2026
  20. Junio C HamanoJul 1, 2026
  21. brian m. carlsonJul 2, 2026
  22. Jeff KingJul 2, 2026
  23. Junio C HamanoJul 3, 2026
  24. Jeff KingJul 4, 2026
  25. 4/4 parse-options: exit 0 on -hbrian m. carlson, Jul 1, 2026
  26. 2/4 parse-options: add a separate case for help output on errorbrian m. carlson, Jul 1, 2026
  27. Jeff KingJul 2, 2026
  28. Junio C HamanoJul 1, 2026
  29. Jeff KingJul 2, 2026
  30. Junio C HamanoJul 3, 2026
  31. 0/4 parseopt: exit 0 on helpbrian m. carlson, Jul 8, 2026
  32. 1/4 t1517: skip svn tests if svn is not installedbrian m. carlson, Jul 8, 2026
  33. Junio C HamanoJul 8, 2026
  34. 3/4 rev-parse: have --parseopt callers exit 0 on --helpbrian m. carlson, Jul 8, 2026
  35. 2/4 parse-options: add a separate case for help output on errorbrian m. carlson, Jul 8, 2026
  36. Junio C HamanoJul 8, 2026
  37. 4/4 parse-options: exit 0 on -hbrian m. carlson, Jul 8, 2026
  38. Jeff KingJul 8, 2026
  39. Junio C HamanoJul 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.