From: Felipe Contreras Date: Mon, 18 Nov 2013 04:12:44 +0000 (-0500) Subject: test-bzr.sh, test-hg.sh: allow running from any dir X-Git-Tag: v1.9-rc0~87^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3243d738ddcf1a9cf6c8bd63f66c57080f1040b;p=git test-bzr.sh, test-hg.sh: allow running from any dir Set TEST_DIRECTORY to the t/ directory (if TEST_DIRECTORY is not already set) so that the user doesn't already have to be in the test directory to run these test scripts. Signed-off-by: Felipe Contreras Based-on-patch-by: Richard Hansen Reviewed-by: Richard Hansen Signed-off-by: Richard Hansen Signed-off-by: Junio C Hamano --- diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh index 5c50251783..1e850c313d 100755 --- a/contrib/remote-helpers/test-bzr.sh +++ b/contrib/remote-helpers/test-bzr.sh @@ -5,7 +5,8 @@ test_description='Test remote-bzr' -. ./test-lib.sh +test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t +. "$TEST_DIRECTORY"/test-lib.sh if ! test_have_prereq PYTHON then diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 72f745d63f..fa7d17b224 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -8,7 +8,8 @@ test_description='Test remote-hg' -. ./test-lib.sh +test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t +. "$TEST_DIRECTORY"/test-lib.sh if ! test_have_prereq PYTHON then