Browse Source

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>
maint
Alec Berryman 16 years ago committed by Junio C Hamano
parent
commit
dd9da51fe2
  1. 17
      t/lib-git-svn.sh
  2. 14
      t/t9113-git-svn-dcommit-new-file.sh

17
t/lib-git-svn.sh

@ -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 &
}


14
t/t9113-git-svn-dcommit-new-file.sh

@ -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 &&

Loading…
Cancel
Save