more text
[git2svn.git] / run-tests.sh
blob7b1f457848140f9b0637d8faf2e7fe4cc07c87c9
1 #!/bin/sh
3 gitrepro=/Users/lha/src/heimdal/git-trunk
5 incremental=no
7 usage="-i"
9 while true
11 case $1 in
12 -i) incremental="yes"; shift ;;
13 -*) echo "$0: Bad option $1"; echo $usage; exit 1;;
14 *) break;;
15 esac
16 done
17 if test $# -ne 0; then
18 echo $usage
19 exit 1
22 if [ "$incremental" = no ] ; then
23 rm -rf repro
24 (cd $gitrepro && git tag -d git2svn-syncpoint-master)
25 (cd $gitrepro && git tag -d git2svn-syncpoint-heimdal-1-1-branch)
28 echo "####full import of master -> trunk"
29 ./git2svn \
30 --verbose \
31 $gitrepro repro || exit 1
33 echo "####full import of branch -> branches/heimdal-1-1-branch"
34 ./git2svn \
35 --verbose \
36 --svn-prefix=branches/heimdal-1-1-branch \
37 --git-branch=heimdal-1-1-branch \
38 $gitrepro repro || exit 1
40 echo "####incremental import of master -> trunk"
41 ./git2svn \
42 --verbose \
43 $gitrepro repro || exit 1
45 echo "####test that repro looks ok at a glance"
47 svn=file://`pwd`/repro
49 svn ls $svn | grep trunk > /dev/null || exit 1
50 svn ls $svn/branches | grep heimdal-1-1-branch > /dev/null || exit 1
52 echo "####all tests passed"
54 exit 0