Skip to content

Commit

Permalink
test-bzr.sh, test-hg.sh: allow running from any dir
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Nov 18, 2013
1 parent 85176d7 commit d3243d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion contrib/remote-helpers/test-bzr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion contrib/remote-helpers/test-hg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d3243d7

Please sign in to comment.