git-svn: factor out svnserve test code for later use
Signed-off-by: Alec Berryman <alec@thened.net> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
903e09a3ec
commit
dd9da51fe2
@ -135,3 +135,20 @@ close $wr or die $!;
|
|||||||
close $rd or die $!;
|
close $rd or die $!;
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_svnserve () {
|
||||||
|
if test -z "$SVNSERVE_PORT"
|
||||||
|
then
|
||||||
|
say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
|
||||||
|
test_done
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_svnserve () {
|
||||||
|
svnserve --listen-port $SVNSERVE_PORT \
|
||||||
|
--root "$rawsvnrepo" \
|
||||||
|
--listen-once \
|
||||||
|
--listen-host 127.0.0.1 &
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -12,19 +12,7 @@ test_description='git-svn dcommit new files over svn:// test'
|
|||||||
|
|
||||||
. ./lib-git-svn.sh
|
. ./lib-git-svn.sh
|
||||||
|
|
||||||
if test -z "$SVNSERVE_PORT"
|
require_svnserve
|
||||||
then
|
|
||||||
say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
|
|
||||||
test_done
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
start_svnserve () {
|
|
||||||
svnserve --listen-port $SVNSERVE_PORT \
|
|
||||||
--root "$rawsvnrepo" \
|
|
||||||
--listen-once \
|
|
||||||
--listen-host 127.0.0.1 &
|
|
||||||
}
|
|
||||||
|
|
||||||
test_expect_success 'start tracking an empty repo' '
|
test_expect_success 'start tracking an empty repo' '
|
||||||
svn mkdir -m "empty dir" "$svnrepo"/empty-dir &&
|
svn mkdir -m "empty dir" "$svnrepo"/empty-dir &&
|
||||||
|
Reference in New Issue
Block a user