lib-git-svn.sh 889 字节
Newer Older
E
Eric Wong 已提交
1 2 3
. ./test-lib.sh

if test -n "$NO_SVN_TESTS"
4
then
E
Eric Wong 已提交
5 6 7
	test_expect_success 'skipping git-svn tests, NO_SVN_TESTS defined' :
	test_done
	exit
8 9
fi

10
perl -e 'use SVN::Core; $SVN::Core::VERSION gt "1.1.0" or die' >/dev/null 2>&1
11 12
if test $? -ne 0
then
13 14 15
	test_expect_success 'Perl SVN libraries not found, skipping test' :
	test_done
	exit
16 17
fi

18 19 20 21
GIT_DIR=$PWD/.git
GIT_SVN_DIR=$GIT_DIR/svn/git-svn
SVN_TREE=$GIT_SVN_DIR/svn-tree

22
svnadmin >/dev/null 2>&1
23
if test $? -ne 1
24
then
E
Eric Wong 已提交
25
    test_expect_success 'skipping git-svn tests, svnadmin not found' :
26 27 28 29 30
    test_done
    exit
fi

svn >/dev/null 2>&1
31
if test $? -ne 1
32
then
E
Eric Wong 已提交
33
    test_expect_success 'skipping git-svn tests, svn not found' :
34 35 36 37 38 39 40 41
    test_done
    exit
fi

svnrepo=$PWD/svnrepo

set -e

42 43 44 45 46 47 48
if svnadmin create --help | grep fs-type >/dev/null
then
	svnadmin create --fs-type fsfs "$svnrepo"
else
	svnadmin create "$svnrepo"
fi

49
svnrepo="file://$svnrepo"
50 51