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 <jnareb@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski committed
Apr 24, 2010 at 15:50 UTC
5ae8030fdeb0bb00b94cc830dc98d4fb9d0d532e
1 file changed
+3
t/test-lib.sh
+3
@@ -459,6 +459,9 @@ test_external () {
459
# Announce the script to reduce confusion about the
460
# test output that follows.
461
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
465
# Run command; redirect its stderr to &4 as in
466
# test_run_, but keep its stdout on our stdout even in
467
# non-verbose mode.