tests: handle NO_PYTHON setting
Without this, test-lib checks that the git_remote_helpers directory has been built. However, if we are building without python, we will not have done anything at all in that directory, and test-lib's sanity check will fail. We bump the inclusion of GIT-BUILD-OPTIONS further up in test-lib; it contains configuration, and as such should be read before we do any checks (and in this particular case, we need its value to do our check properly). Signed-off-by: Jeff King <peff@peff.net> Looks-fine-to-me-by: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Dec 7, 2009 at 00:32 UTC
ac10a85785baee56bb4a04ad5f847d15ffba0893
2 files changed
+4
-3
Makefile
+1
@@ -1674,6 +1674,7 @@ GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
1674
@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
1675
@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
1676
@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
1677
+ @echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@
1678
1679
### Detect Tck/Tk interpreter path changes
1680
ifndef NO_TCLTK
t/test-lib.sh
+3
-3
@@ -632,13 +632,15 @@ GIT_CONFIG_NOSYSTEM=1
632
GIT_CONFIG_NOGLOBAL=1
633
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL
634
635
+. ../GIT-BUILD-OPTIONS
636
+
637
GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git
638
export GITPERLLIB
639
test -d ../templates/blt || {
640
error "You haven't built things yet, have you?"
641
}
642
641
-if test -z "$GIT_TEST_INSTALLED"
643
+if test -z "$GIT_TEST_INSTALLED" && test -z "$NO_PYTHON"
644
then
645
GITPYTHONLIB="$(pwd)/../git_remote_helpers/build/lib"
646
export GITPYTHONLIB
@@ -653,8 +655,6 @@ if ! test -x ../test-chmtime; then
655
exit 1
656
fi
657
656
-. ../GIT-BUILD-OPTIONS
657
-
658
# Test repository
659
test="trash directory.$(basename "$0" .sh)"
660
test -n "$root" && test="$root/$test"