diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-11-17 23:12:44 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-11-18 13:45:57 -0800 |
commit | d3243d738ddcf1a9cf6c8bd63f66c57080f1040b (patch) | |
tree | 136bfb327c3090f8e05d0864624d79ca2a8ddf9a /contrib | |
parent | test-lib.sh: convert $TEST_DIRECTORY to an absolute path (diff) | |
download | tgif-d3243d738ddcf1a9cf6c8bd63f66c57080f1040b.tar.xz |
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 <felipe.contreras@gmail.com>
Based-on-patch-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/remote-helpers/test-bzr.sh | 3 | ||||
-rwxr-xr-x | contrib/remote-helpers/test-hg.sh | 3 |
2 files changed, 4 insertions, 2 deletions
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 |