Skip to content

Commit 5ae8030

Browse files
jnarebgitster
authored andcommitted
Export more test-related variables when running external tests
Add exporting TEST_DIRECTORY and TRASH_DIRECTORY to test_external, for external tests to be able to find test script (and git sources), and to find trash directory (usually with test repository in it). Add also exporting GIT_TEST_LONG, so that external test can skip time-intensive tests unless test is invoked with `--long' option. Signed-off-by: Jakub Narebski <[email protected]> Acked-by: Petr Baudis <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d599e04 commit 5ae8030

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

t/test-lib.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,9 @@ test_external () {
459459
# Announce the script to reduce confusion about the
460460
# test output that follows.
461461
say_color "" " run $test_count: $descr ($*)"
462+
# Export TEST_DIRECTORY, TRASH_DIRECTORY and GIT_TEST_LONG
463+
# to be able to use them in script
464+
export TEST_DIRECTORY TRASH_DIRECTORY GIT_TEST_LONG
462465
# Run command; redirect its stderr to &4 as in
463466
# test_run_, but keep its stdout on our stdout even in
464467
# non-verbose mode.

0 commit comments

Comments
 (0)