summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 09ce4bb)
raw | patch | inline | side by side (parent: 09ce4bb)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 11 Jun 2010 16:40:25 +0000 (09:40 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 11 Jun 2010 20:45:05 +0000 (13:45 -0700) |
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>
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>
Makefile | patch | blob | history | |
t/test-lib.sh | patch | blob | history |
diff --git a/Makefile b/Makefile
index 0367e8a958dc61a08a9ea605083454f6a6a629f7..6b3b59bef529b7b297be27322f4fe348a0b3c390 100644 (file)
--- a/Makefile
+++ b/Makefile
@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 a290011fa782ede7ede27a13b2b47a79161b5c80..eafe1466012ac044345535d19ba0c26f880b6414 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
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 || {