summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-12-06 11:06:52 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-12-06 11:06:53 -0800
commitef63eb55cd12cb85692ee037bc490044d13dcdc5 (patch)
treed1054f10f9a19754f904d22dee4490c3dd584b3d /t
parentMerge branch 'jn/perl-lib-extra' (diff)
parentremote-bzr, remote-hg: fix email address regular expression (diff)
downloadtgif-ef63eb55cd12cb85692ee037bc490044d13dcdc5.tar.xz
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 b25249ec4c..d303e6c943 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