t / lib-git-svn.shon commit Merge branch 'maint' (83877f8)
   1. ./test-lib.sh
   2
   3if test -n "$NO_SVN_TESTS"
   4then
   5        test_expect_success 'skipping git-svn tests, NO_SVN_TESTS defined' :
   6        test_done
   7        exit
   8fi
   9
  10GIT_DIR=$PWD/.git
  11GIT_SVN_DIR=$GIT_DIR/svn/git-svn
  12SVN_TREE=$GIT_SVN_DIR/svn-tree
  13
  14perl -e 'use SVN::Core' >/dev/null 2>&1
  15if test $? -ne 0
  16then
  17   echo 'Perl SVN libraries not found, tests requiring those will be skipped'
  18   GIT_SVN_NO_LIB=1
  19fi
  20
  21svnadmin >/dev/null 2>&1
  22if test $? -ne 1
  23then
  24    test_expect_success 'skipping git-svn tests, svnadmin not found' :
  25    test_done
  26    exit
  27fi
  28
  29svn >/dev/null 2>&1
  30if test $? -ne 1
  31then
  32    test_expect_success 'skipping git-svn tests, svn not found' :
  33    test_done
  34    exit
  35fi
  36
  37svnrepo=$PWD/svnrepo
  38
  39set -e
  40
  41if svnadmin create --help | grep fs-type >/dev/null
  42then
  43        svnadmin create --fs-type fsfs "$svnrepo"
  44else
  45        svnadmin create "$svnrepo"
  46fi
  47
  48svnrepo="file://$svnrepo/test-git-svn"
  49
  50