X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Flib-git-svn.sh;h=bb1d7b84bcdd3a413e900a0002baf268fa631f3f;hb=d77ee72662a821d66ae218056f0103eb24d8d4b4;hp=450fee89973af5fa660b43202e8945b55e01cf6f;hpb=60d02ccc18408e54ace8692532fcc73d4035b3c2;p=git.git diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh index 450fee899..bb1d7b84b 100644 --- a/t/lib-git-svn.sh +++ b/t/lib-git-svn.sh @@ -11,16 +11,8 @@ GIT_DIR=$PWD/.git GIT_SVN_DIR=$GIT_DIR/svn/git-svn SVN_TREE=$GIT_SVN_DIR/svn-tree -svnadmin >/dev/null 2>&1 -if test $? != 1 -then - test_expect_success 'skipping git-svn tests, svnadmin not found' : - test_done - exit -fi - svn >/dev/null 2>&1 -if test $? != 1 +if test $? -ne 1 then test_expect_success 'skipping git-svn tests, svn not found' : test_done @@ -29,15 +21,27 @@ fi svnrepo=$PWD/svnrepo -set -e - -if svnadmin create --help | grep fs-type >/dev/null +perl -w -e " +use SVN::Core; +use SVN::Repos; +\$SVN::Core::VERSION gt '1.1.0' or exit(42); +system(qw/svnadmin create --fs-type fsfs/, '$svnrepo') == 0 or exit(41); +" >&3 2>&4 +x=$? +if test $x -ne 0 then - svnadmin create --fs-type fsfs "$svnrepo" -else - svnadmin create "$svnrepo" + if test $x -eq 42; then + err='Perl SVN libraries must be >= 1.1.0' + elif test $x -eq 41; then + err='svnadmin failed to create fsfs repository' + else + err='Perl SVN libraries not found or unusable, skipping test' + fi + test_expect_success "$err" : + test_done + exit fi -svnrepo="file://$svnrepo/test-git-svn" +svnrepo="file://$svnrepo"