From: Alec Berryman Date: Sun, 14 Sep 2008 21:14:15 +0000 (-0400) Subject: git-svn: factor out svnserve test code for later use X-Git-Tag: v1.6.0.3~90 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dd9da51fe261f723d206fdd5e4874c25937d1b87;p=git.git git-svn: factor out svnserve test code for later use Signed-off-by: Alec Berryman Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh index a841df2a9..5b5f28880 100644 --- a/t/lib-git-svn.sh +++ b/t/lib-git-svn.sh @@ -135,3 +135,20 @@ close $wr or die $!; close $rd or die $!; 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 & +} + diff --git a/t/t9113-git-svn-dcommit-new-file.sh b/t/t9113-git-svn-dcommit-new-file.sh index ae78e334a..c2b24a439 100755 --- a/t/t9113-git-svn-dcommit-new-file.sh +++ b/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 -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 & -} +require_svnserve test_expect_success 'start tracking an empty repo' ' svn mkdir -m "empty dir" "$svnrepo"/empty-dir &&