forked from lha/git2svn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests.sh
54 lines (41 loc) · 1.06 KB
/
run-tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
gitrepro=$HOME/src/heimdal/git
incremental=no
usage="-i"
while true
do
case $1 in
-i) incremental="yes"; shift ;;
-*) echo "$0: Bad option $1"; echo $usage; exit 1;;
*) break;;
esac
done
if test $# -ne 0; then
echo $usage
exit 1
fi
if [ "$incremental" = no ] ; then
rm -rf repro
(cd $gitrepro && git tag -d git2svn-syncpoint-master)
(cd $gitrepro && git tag -d git2svn-syncpoint-heimdal-1-1-branch)
fi
echo "####full import of master -> trunk"
./git2svn \
--verbose \
$gitrepro repro || exit 1
echo "####full import of branch -> branches/heimdal-1-1-branch"
./git2svn \
--verbose \
--svn-prefix=branches/heimdal-1-1-branch \
--git-branch=heimdal-1-1-branch \
$gitrepro repro || exit 1
echo "####incremental import of master -> trunk"
./git2svn \
--verbose \
$gitrepro repro || exit 1
echo "####test that repro looks ok at a glance"
svn=file://`pwd`/repro
svn ls $svn | grep trunk > /dev/null || exit 1
svn ls $svn/branches | grep heimdal-1-1-branch > /dev/null || exit 1
echo "####all tests passed"
exit 0