diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-11 09:40:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-11 13:45:05 -0700 |
commit | 5e87eae97df69a48a575fd79131e85067f9dbf13 (patch) | |
tree | c394c8e9a152e1f26a5fead39e2b8f0ef54b6b5d /t | |
parent | 09ce4bb6ea7c06c1de82f042cb3ade622b0fa36c (diff) | |
download | git-5e87eae97df69a48a575fd79131e85067f9dbf13.tar.gz |
test-lib: use DIFF definition from GIT-BUILD-OPTIONS
Otherwise running individual tests from t/ directory may lack the definition
of $DIFF, $GIT_TEST_CMP and friends.
Noticed and initial patch provided by Thomas Rast, alternative solution
suggested by Brandon Casey, which this patch implements.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index a290011fa7..eafe146601 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -64,16 +64,6 @@ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME export EDITOR -if test -z "$GIT_TEST_CMP" -then - if test -n "$GIT_TEST_CMP_USE_COPIED_CONTEXT" - then - GIT_TEST_CMP="$DIFF -c" - else - GIT_TEST_CMP="$DIFF -u" - fi -fi - # Protect ourselves from common misconfiguration to export # CDPATH into the environment unset CDPATH @@ -691,6 +681,16 @@ export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOB . ../GIT-BUILD-OPTIONS +if test -z "$GIT_TEST_CMP" +then + if test -n "$GIT_TEST_CMP_USE_COPIED_CONTEXT" + then + GIT_TEST_CMP="$DIFF -c" + else + GIT_TEST_CMP="$DIFF -u" + fi +fi + GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git export GITPERLLIB test -d ../templates/blt || { |