{"thread":{"id":"21885","subject":"[PATCHv2] tests: handle NO_PYTHON setting","startedAt":"2009-12-07T05:32:50Z","lastAt":"2009-12-07T05:32:50Z","messageCount":1,"participants":["Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"129379","messageId":"20091207053250.GA32262@coredump.intra.peff.net","threadId":"21885","inReplyTo":null,"subject":"[PATCHv2] tests: handle NO_PYTHON setting","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-12-07T05:32:50Z","receivedAt":"2009-12-07T05:32:50Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Without this, test-lib checks that the git_remote_helpers\ndirectory has been built. However, if we are building\nwithout python, we will not have done anything at all in\nthat directory, and test-lib's sanity check will fail.\n\nWe bump the inclusion of GIT-BUILD-OPTIONS further up in\ntest-lib; it contains configuration, and as such should be\nread before we do any checks (and in this particular case,\nwe need its value to do our check properly).\n\nSigned-off-by: Jeff King <peff@peff.net>\nLooks-fine-to-me-by: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>\nAcked-by: Johan Herland <johan@herland.net>\n---\nOn top of sr/vcs-helper.\n\nJust a repost with acks, as the original seems to have been forgotten in\nthe ensuing discussion of directory structure.\n\n Makefile      |    1 +\n t/test-lib.sh |    6 +++---\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 42744a4..443565e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1743,6 +1743,7 @@ GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS\n \t@echo TAR=\\''$(subst ','\\'',$(subst ','\\'',$(TAR)))'\\' >>$@\n \t@echo NO_CURL=\\''$(subst ','\\'',$(subst ','\\'',$(NO_CURL)))'\\' >>$@\n \t@echo NO_PERL=\\''$(subst ','\\'',$(subst ','\\'',$(NO_PERL)))'\\' >>$@\n+\t@echo NO_PYTHON=\\''$(subst ','\\'',$(subst ','\\'',$(NO_PYTHON)))'\\' >>$@\n \n ### Detect Tck/Tk interpreter path changes\n ifndef NO_TCLTK\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 4a40520..2d523fe 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -632,13 +632,15 @@ GIT_CONFIG_NOSYSTEM=1\n GIT_CONFIG_NOGLOBAL=1\n export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL\n \n+. ../GIT-BUILD-OPTIONS\n+\n GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git\n export GITPERLLIB\n test -d ../templates/blt || {\n \terror \"You haven't built things yet, have you?\"\n }\n \n-if test -z \"$GIT_TEST_INSTALLED\"\n+if test -z \"$GIT_TEST_INSTALLED\" && test -z \"$NO_PYTHON\"\n then\n \tGITPYTHONLIB=\"$(pwd)/../git_remote_helpers/build/lib\"\n \texport GITPYTHONLIB\n@@ -653,8 +655,6 @@ if ! test -x ../test-chmtime; then\n \texit 1\n fi\n \n-. ../GIT-BUILD-OPTIONS\n-\n # Test repository\n test=\"trash directory.$(basename \"$0\" .sh)\"\n test -n \"$root\" && test=\"$root/$test\"\n-- \n1.6.6.rc1.292.gd8fe.dirty\n"}]}