Skip to content

Commit 5df632c

Browse files
bk2204gitster
authored andcommitted
t1517: skip svn tests if svn is not installed
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent e9019fc commit 5df632c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

t/t1517-outside-repo.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ test_description='check random commands outside repo'
44

55
. ./test-lib.sh
66

7+
test_lazy_prereq SVN '
8+
test_have_prereq PERL && test -z "$NO_SVN_TESTS" && perl -w -e "
9+
use SVN::Core;
10+
use SVN::Repos;
11+
"
12+
'
13+
714
test_expect_success 'set up a non-repo directory and test file' '
815
GIT_CEILING_DIRECTORIES=$(pwd) &&
916
export GIT_CEILING_DIRECTORIES &&
@@ -138,6 +145,8 @@ do
138145
case "$cmd" in
139146
instaweb)
140147
prereq=PERL ;;
148+
svn)
149+
prereq=SVN ;;
141150
*)
142151
prereq= ;;
143152
esac

0 commit comments

Comments
 (0)