]>
Commit | Line | Data |
---|---|---|
60d02ccc EW |
1 | . ./test-lib.sh |
2 | ||
3 | if test -n "$NO_SVN_TESTS" | |
36f5b1f0 | 4 | then |
60d02ccc EW |
5 | test_expect_success 'skipping git-svn tests, NO_SVN_TESTS defined' : |
6 | test_done | |
7 | exit | |
36f5b1f0 EW |
8 | fi |
9 | ||
b9c85187 EW |
10 | GIT_DIR=$PWD/.git |
11 | GIT_SVN_DIR=$GIT_DIR/svn/git-svn | |
12 | SVN_TREE=$GIT_SVN_DIR/svn-tree | |
13 | ||
36f5b1f0 | 14 | svn >/dev/null 2>&1 |
4b832e81 | 15 | if test $? -ne 1 |
36f5b1f0 | 16 | then |
60d02ccc | 17 | test_expect_success 'skipping git-svn tests, svn not found' : |
36f5b1f0 EW |
18 | test_done |
19 | exit | |
20 | fi | |
21 | ||
22 | svnrepo=$PWD/svnrepo | |
23 | ||
c6d499a8 EW |
24 | perl -w -e " |
25 | use SVN::Core; | |
26 | use SVN::Repos; | |
27 | \$SVN::Core::VERSION gt '1.1.0' or exit(42); | |
e66191f4 | 28 | system(qw/svnadmin create --fs-type fsfs/, '$svnrepo') == 0 or exit(41); |
38434f2e | 29 | " >&3 2>&4 |
c6d499a8 EW |
30 | x=$? |
31 | if test $x -ne 0 | |
dc62e25c | 32 | then |
c6d499a8 EW |
33 | if test $x -eq 42; then |
34 | err='Perl SVN libraries must be >= 1.1.0' | |
e66191f4 EW |
35 | elif test $x -eq 41; then |
36 | err='svnadmin failed to create fsfs repository' | |
c6d499a8 EW |
37 | else |
38 | err='Perl SVN libraries not found or unusable, skipping test' | |
39 | fi | |
40 | test_expect_success "$err" : | |
41 | test_done | |
42 | exit | |
dc62e25c EW |
43 | fi |
44 | ||
2edb9c5c | 45 | rawsvnrepo="$svnrepo" |
e1516119 | 46 | svnrepo="file://$svnrepo" |
36f5b1f0 | 47 | |
7b3fab87 MS |
48 | poke() { |
49 | perl -e '@x = stat($ARGV[0]); utime($x[8], $x[9] + 1, $ARGV[0])' "$1" | |
50 | } |