remote-helpers: allow all tests running from any dir
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 9 Apr 2014 18:50:00 +0000 (13:50 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Apr 2014 21:20:47 +0000 (14:20 -0700)
Commit d3243d7 (test-bzr.sh, test-hg.sh: allow running from any dir)
allowed the tests to run from any directory, however, it didn't update
all the tests.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/test-hg-bidi.sh
contrib/remote-helpers/test-hg-hg-git.sh
index e24c51daad1038184bd6113ceee77c042dc26f17..d86e147d3d400e226b1afb95fa2de48e42883fbd 100755 (executable)
@@ -8,7 +8,8 @@
 
 test_description='Test bidirectionality of remote-hg'
 
-. ./test-lib.sh
+test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t
+. "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON
 then
index 6dcd95d10f618ee3ac4920f5f2ae684c0b8d4d36..b23909ae6ccc9cc5b2169c2898ea8de292bd0d22 100755 (executable)
@@ -8,7 +8,8 @@
 
 test_description='Test remote-hg output compared to hg-git'
 
-. ./test-lib.sh
+test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t
+. "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON
 then