diff options
author | Alec Berryman <alec@thened.net> | 2008-09-14 17:14:15 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-18 19:20:34 -0700 |
commit | dd9da51fe261f723d206fdd5e4874c25937d1b87 (patch) | |
tree | 28db15ae9e9283b5341bc5503f33d10db7088262 | |
parent | 903e09a3ecca8941b32bae08b821545941591348 (diff) | |
download | git-dd9da51fe261f723d206fdd5e4874c25937d1b87.tar.gz |
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>
-rw-r--r-- | t/lib-git-svn.sh | 17 | ||||
-rwxr-xr-x | t/t9113-git-svn-dcommit-new-file.sh | 14 |
2 files changed, 18 insertions, 13 deletions
diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh index a841df2a9e..5b5f288809 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 ae78e334ac..c2b24a439d 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 && |