@matheusbsbs / matheus-bagliano / commits / c6d499a82f
Fork 0

git-svn: remove svnadmin dependency from the tests

We require the libraries now, so we can create repositories using them (and save some executable load time while we're at it). Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Eric Wong committed Dec 31, 2006 at 21:49 UTC c6d499a82fbb02e2a03fe3d858ff144fa570fb34
1 file changed +17 -22
t/lib-git-svn.sh
+17 -22
@@ -7,26 +7,10 @@ then
7 exit
8 fi
9
10 -perl -e 'use SVN::Core; $SVN::Core::VERSION gt "1.1.0" or die' >/dev/null 2>&1
11 -if test $? -ne 0
12 -then
13 - test_expect_success 'Perl SVN libraries not found, skipping test' :
14 - test_done
15 - exit
16 -fi
17 -
10 GIT_DIR=$PWD/.git
11 GIT_SVN_DIR=$GIT_DIR/svn/git-svn
12 SVN_TREE=$GIT_SVN_DIR/svn-tree
13
22 -svnadmin >/dev/null 2>&1
23 -if test $? -ne 1
24 -then
25 - test_expect_success 'skipping git-svn tests, svnadmin not found' :
26 - test_done
27 - exit
28 -fi
29 -
14 svn >/dev/null 2>&1
15 if test $? -ne 1
16 then
@@ -37,13 +21,24 @@ fi
21
22 svnrepo=$PWD/svnrepo
23
40 -set -e
41 -
42 -if svnadmin create --help | grep fs-type >/dev/null
24 +perl -w -e "
25 +use SVN::Core;
26 +use SVN::Repos;
27 +\$SVN::Core::VERSION gt '1.1.0' or exit(42);
28 +SVN::Repos::create('$svnrepo', undef, undef, undef,
29 + { 'fs-config' => 'fsfs'});
30 +"
31 +x=$?
32 +if test $x -ne 0
33 then
44 - svnadmin create --fs-type fsfs "$svnrepo"
45 -else
46 - svnadmin create "$svnrepo"
34 + if test $x -eq 42; then
35 + err='Perl SVN libraries must be >= 1.1.0'
36 + else
37 + err='Perl SVN libraries not found or unusable, skipping test'
38 + fi
39 + test_expect_success "$err" :
40 + test_done
41 + exit
42 fi
43
44 svnrepo="file://$svnrepo"