Skip to content

Commit d3243d7

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Based-on-patch-by: Richard Hansen <[email protected]> Reviewed-by: Richard Hansen <[email protected]> Signed-off-by: Richard Hansen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 85176d7 commit d3243d7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

contrib/remote-helpers/test-bzr.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
test_description='Test remote-bzr'
77

8-
. ./test-lib.sh
8+
test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t
9+
. "$TEST_DIRECTORY"/test-lib.sh
910

1011
if ! test_have_prereq PYTHON
1112
then

contrib/remote-helpers/test-hg.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
test_description='Test remote-hg'
1010

11-
. ./test-lib.sh
11+
test -n "$TEST_DIRECTORY" || TEST_DIRECTORY=${0%/*}/../../t
12+
. "$TEST_DIRECTORY"/test-lib.sh
1213

1314
if ! test_have_prereq PYTHON
1415
then

0 commit comments

Comments
 (0)