From: Jakub Narebski Date: Sat, 24 Apr 2010 13:50:09 +0000 (+0200) Subject: Export more test-related variables when running external tests X-Git-Tag: v1.7.2-rc0~34^2~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5ae8030fdeb0bb00b94cc830dc98d4fb9d0d532e;p=git.git 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 Acked-by: Petr Baudis Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib.sh b/t/test-lib.sh index c582964b0..6187328e9 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -459,6 +459,9 @@ test_external () { # Announce the script to reduce confusion about the # test output that follows. say_color "" " run $test_count: $descr ($*)" + # Export TEST_DIRECTORY, TRASH_DIRECTORY and GIT_TEST_LONG + # to be able to use them in script + export TEST_DIRECTORY TRASH_DIRECTORY GIT_TEST_LONG # Run command; redirect its stderr to &4 as in # test_run_, but keep its stdout on our stdout even in # non-verbose mode.