summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-12-06 19:06:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-06 19:06:53 (GMT)
commitef63eb55cd12cb85692ee037bc490044d13dcdc5 (patch)
treed1054f10f9a19754f904d22dee4490c3dd584b3d /t
parent128c5d07c5db62c02c8afc390b7a2ae7b14ceed9 (diff)
parent6c68a404e6e9eec850b298f98fa30c5a25aa846e (diff)
downloadgit-ef63eb55cd12cb85692ee037bc490044d13dcdc5.zip
git-ef63eb55cd12cb85692ee037bc490044d13dcdc5.tar.gz
git-ef63eb55cd12cb85692ee037bc490044d13dcdc5.tar.bz2
Merge branch 'rh/remote-hg-bzr-updates'
Updates to remote-bzr and remote-hg in contrib. * rh/remote-hg-bzr-updates: remote-bzr, remote-hg: fix email address regular expression test-hg.sh: help user correlate verbose output with email test test-hg.sh: fix duplicate content strings in author tests test-hg.sh: avoid obsolete 'test' syntax test-hg.sh: eliminate 'local' bashism test-bzr.sh, test-hg.sh: prepare for change to push.default=simple test-bzr.sh, test-hg.sh: allow running from any dir test-lib.sh: convert $TEST_DIRECTORY to an absolute path
Diffstat (limited to 't')
-rw-r--r--t/test-lib.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index b25249e..d303e6c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -26,6 +26,10 @@ then
# outside of t/, e.g. for running tests on the test library
# itself.
TEST_DIRECTORY=$(pwd)
+else
+ # ensure that TEST_DIRECTORY is an absolute path so that it
+ # is valid even if the current working directory is changed
+ TEST_DIRECTORY=$(cd "$TEST_DIRECTORY" && pwd) || exit 1
fi
if test -z "$TEST_OUTPUT_DIRECTORY"
then