tests: auto-set git-daemon port
authorJeff King <peff@peff.net>
Mon, 10 Feb 2014 19:16:38 +0000 (14:16 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Feb 2014 19:19:39 +0000 (11:19 -0800)
A recent commit taught lib-httpd to always start apache on
the same port as the numbered tests. Let's do the same for
the git-daemon tests.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-git-daemon.sh
t/t5570-git-daemon.sh
index 394b06b32f838463221e9c2f49380fd9eb08bb9d..1f22de260a2d456ee73d29f29b049fd5771e8ecc 100644 (file)
@@ -22,7 +22,7 @@ then
        test_done
 fi
 
-LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-'8121'}
+LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-${this_test#t}}
 
 GIT_DAEMON_PID=
 GIT_DAEMON_DOCUMENT_ROOT_PATH="$PWD"/repo
index e06146835cdda5b7264a34a24405aedd9f950006..6b163799510fa608fc6effa146accf295d0068f5 100755 (executable)
@@ -3,7 +3,6 @@
 test_description='test fetching over git protocol'
 . ./test-lib.sh
 
-LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-5570}
 . "$TEST_DIRECTORY"/lib-git-daemon.sh
 start_git_daemon