summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--t/test-lib.sh20
2 files changed, 16 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 0367e8a958..6b3b59bef5 100644
--- a/Makefile
+++ b/Makefile
@@ -1944,6 +1944,12 @@ GIT-BUILD-OPTIONS: FORCE
@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
@echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@
+ifdef GIT_TEST_CMP
+ @echo GIT_TEST_CMP=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_CMP)))'\' >>$@
+endif
+ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
+ @echo GIT_TEST_CMP_USE_COPIED_CONTEXT=YesPlease >>$@
+endif
### Detect Tck/Tk interpreter path changes
ifndef NO_TCLTK
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 || {