summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-02-10 19:16:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-10 19:19:39 (GMT)
commitc44132fcf383cf668d3764c6b7ad28ff034ee981 (patch)
tree10c7f4f341f3d6014d1aee6638885ea79cfc821c
parent3bb486e4397415e1855e5edbf28d8e50c3d45265 (diff)
downloadgit-c44132fcf383cf668d3764c6b7ad28ff034ee981.zip
git-c44132fcf383cf668d3764c6b7ad28ff034ee981.tar.gz
git-c44132fcf383cf668d3764c6b7ad28ff034ee981.tar.bz2
tests: auto-set git-daemon port
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>
-rw-r--r--t/lib-git-daemon.sh2
-rwxr-xr-xt/t5570-git-daemon.sh1
2 files changed, 1 insertions, 2 deletions
diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh
index 394b06b..1f22de2 100644
--- a/t/lib-git-daemon.sh
+++ b/t/lib-git-daemon.sh
@@ -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
diff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh
index e061468..6b16379 100755
--- a/t/t5570-git-daemon.sh
+++ b/t/t5570-git-daemon.sh
@@ -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