summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:42 -0800
committerJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:42 -0800
commitbd62e7c364fcce7f42862e3aebedffb1c7e24136 (patch)
treefc35557be6052d3fda9655926986b0b51ac22638
parent8336832ad99832d21e5ee588bd3d03369048c05a (diff)
parentc44132fcf383cf668d3764c6b7ad28ff034ee981 (diff)
downloadgit-bd62e7c364fcce7f42862e3aebedffb1c7e24136.tar.gz
Merge branch 'jk/test-ports'
Avoid having to assign port number to be used in tests manually. * jk/test-ports: tests: auto-set git-daemon port tests: auto-set LIB_HTTPD_PORT from test name
-rw-r--r--t/lib-git-daemon.sh2
-rw-r--r--t/lib-httpd.sh2
-rwxr-xr-xt/t5537-fetch-shallow.sh1
-rwxr-xr-xt/t5538-push-shallow.sh1
-rwxr-xr-xt/t5540-http-push.sh1
-rwxr-xr-xt/t5541-http-push.sh1
-rwxr-xr-xt/t5550-http-fetch.sh1
-rwxr-xr-xt/t5551-http-fetch.sh1
-rwxr-xr-xt/t5561-http-backend.sh1
-rwxr-xr-xt/t5570-git-daemon.sh1
10 files changed, 2 insertions, 10 deletions
diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh
index 394b06b32f..1f22de260a 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/lib-httpd.sh b/t/lib-httpd.sh
index bfdff2a8c9..b43162ea2a 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -64,7 +64,7 @@ case $(uname) in
esac
LIB_HTTPD_PATH=${LIB_HTTPD_PATH-"$DEFAULT_HTTPD_PATH"}
-LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'8111'}
+LIB_HTTPD_PORT=${LIB_HTTPD_PORT-${this_test#t}}
TEST_PATH="$TEST_DIRECTORY"/lib-httpd
HTTPD_ROOT_PATH="$PWD"/httpd
diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh
index b0fa7387cb..adf215a193 100755
--- a/t/t5537-fetch-shallow.sh
+++ b/t/t5537-fetch-shallow.sh
@@ -178,7 +178,6 @@ if test -n "$NO_CURL" -o -z "$GIT_TEST_HTTPD"; then
test_done
fi
-LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5537'}
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh
index 0a6e40f144..8e54ac5746 100755
--- a/t/t5538-push-shallow.sh
+++ b/t/t5538-push-shallow.sh
@@ -126,7 +126,6 @@ if test -n "$NO_CURL" -o -z "$GIT_TEST_HTTPD"; then
test_done
fi
-LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5537'}
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index 5b0198cbc8..8d7b3c57e3 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -16,7 +16,6 @@ then
fi
LIB_HTTPD_DAV=t
-LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5540'}
. "$TEST_DIRECTORY"/lib-httpd.sh
ROOT_PATH="$PWD"
start_httpd
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index bfd241ea8a..73af16f481 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -12,7 +12,6 @@ if test -n "$NO_CURL"; then
fi
ROOT_PATH="$PWD"
-LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5541'}
. "$TEST_DIRECTORY"/lib-httpd.sh
. "$TEST_DIRECTORY"/lib-terminal.sh
start_httpd
diff --git a/t/t5550-http-fetch.sh b/t/t5550-http-fetch.sh
index 8392624714..1a3a2b6c1a 100755
--- a/t/t5550-http-fetch.sh
+++ b/t/t5550-http-fetch.sh
@@ -8,7 +8,6 @@ if test -n "$NO_CURL"; then
test_done
fi
-LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5550'}
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh
index a124efe114..e07eaf35f1 100755
--- a/t/t5551-http-fetch.sh
+++ b/t/t5551-http-fetch.sh
@@ -8,7 +8,6 @@ if test -n "$NO_CURL"; then
test_done
fi
-LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5551'}
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh
index b5d7fbc381..d23fb02384 100755
--- a/t/t5561-http-backend.sh
+++ b/t/t5561-http-backend.sh
@@ -8,7 +8,6 @@ if test -n "$NO_CURL"; then
test_done
fi
-LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5561'}
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh
index e06146835c..6b16379951 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