34
34
# Keep the original TERM for say_color
35
35
ORIGINAL_TERM=$TERM
36
36
37
+ # Test the binaries we have just built. The tests are kept in
38
+ # t/ subdirectory and are run in 'trash directory' subdirectory.
39
+ if test -z " $TEST_DIRECTORY "
40
+ then
41
+ # We allow tests to override this, in case they want to run tests
42
+ # outside of t/, e.g. for running tests on the test library
43
+ # itself.
44
+ TEST_DIRECTORY=$( pwd)
45
+ fi
46
+ if test -z " $TEST_OUTPUT_DIRECTORY "
47
+ then
48
+ # Similarly, override this to store the test-results subdir
49
+ # elsewhere
50
+ TEST_OUTPUT_DIRECTORY=$TEST_DIRECTORY
51
+ fi
52
+ GIT_BUILD_DIR=" $TEST_DIRECTORY " /..
53
+
54
+ . " $GIT_BUILD_DIR " /GIT-BUILD-OPTIONS
55
+ export PERL_PATH SHELL_PATH
56
+
37
57
# For repeatability, reset the environment to known value.
38
58
LANG=C
39
59
LC_ALL=C
@@ -46,7 +66,7 @@ EDITOR=:
46
66
# /usr/xpg4/bin/sh and /bin/ksh to bail out. So keep the unsets
47
67
# deriving from the command substitution clustered with the other
48
68
# ones.
49
- unset VISUAL EMAIL LANGUAGE COLUMNS $( perl -e '
69
+ unset VISUAL EMAIL LANGUAGE COLUMNS $( " $PERL_PATH " -e '
50
70
my @env = keys %ENV;
51
71
my $ok = join("|", qw(
52
72
TRACE
@@ -230,7 +250,7 @@ trap 'die' EXIT
230
250
231
251
# The user-facing functions are loaded from a separate file so that
232
252
# test_perf subshells can have them too
233
- . " ${ TEST_DIRECTORY:- .} " /test-lib-functions.sh
253
+ . " $TEST_DIRECTORY /test-lib-functions.sh"
234
254
235
255
# You are not expected to call test_ok_ and test_failure_ directly, use
236
256
# the text_expect_* functions instead.
@@ -381,23 +401,6 @@ test_done () {
381
401
esac
382
402
}
383
403
384
- # Test the binaries we have just built. The tests are kept in
385
- # t/ subdirectory and are run in 'trash directory' subdirectory.
386
- if test -z " $TEST_DIRECTORY "
387
- then
388
- # We allow tests to override this, in case they want to run tests
389
- # outside of t/, e.g. for running tests on the test library
390
- # itself.
391
- TEST_DIRECTORY=$( pwd)
392
- fi
393
- if test -z " $TEST_OUTPUT_DIRECTORY "
394
- then
395
- # Similarly, override this to store the test-results subdir
396
- # elsewhere
397
- TEST_OUTPUT_DIRECTORY=$TEST_DIRECTORY
398
- fi
399
- GIT_BUILD_DIR=" $TEST_DIRECTORY " /..
400
-
401
404
if test -n " $valgrind "
402
405
then
403
406
make_symlink () {
@@ -493,10 +496,6 @@ GIT_CONFIG_NOSYSTEM=1
493
496
GIT_ATTR_NOSYSTEM=1
494
497
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_ATTR_NOSYSTEM
495
498
496
- . " $GIT_BUILD_DIR " /GIT-BUILD-OPTIONS
497
-
498
- export PERL_PATH
499
-
500
499
if test -z " $GIT_TEST_CMP "
501
500
then
502
501
if test -n " $GIT_TEST_CMP_USE_COPIED_CONTEXT "
0 commit comments