git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] tests: handle NO_PYTHON setting

From
Jeff King <peff@peff.net>
Date
Nov 30, 2009, 07:52 UTC
Message-ID
<20091130075221.GA5421@coredump.intra.peff.net>

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.

Signed-off-by: Jeff King <peff@peff.net>
---
On top of sr/vcs-helper.

This feels a little funny for NO_PYTHON to mean "no remote helpers at all". But that is the way the Makefile is set up, since we seem to have only python helpers.

 Makefile      |    1 +
 t/test-lib.sh |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 42744a4..443565e 100644
--- a/Makefile
+++ b/Makefile
@@ -1743,6 +1743,7 @@ GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
 	@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
 	@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
 	@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
+	@echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@
 
 ### Detect Tck/Tk interpreter path changes
 ifndef NO_TCLTK
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 4a40520..ca0839c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -638,7 +638,7 @@ test -d ../templates/blt || {
 	error "You haven't built things yet, have you?"
 }
 
-if test -z "$GIT_TEST_INSTALLED"
+if test -z "$GIT_TEST_INSTALLED" && test -z "$NO_PYTHON"
 then
 	GITPYTHONLIB="$(pwd)/../git_remote_helpers/build/lib"
 	export GITPYTHONLIB
-- 
1.6.6.rc0.327.gd49b
Next: Sverre Rabbelier
Message 1 of 16 in “tests: handle NO_PYTHON setting”
  1. tests: handle NO_PYTHON settingJeff King, Nov 30, 2009
  2. Sverre RabbelierNov 30, 2009
  3. Jeff KingNov 30, 2009
  4. Sverre RabbelierNov 30, 2009
  5. Jeff KingNov 30, 2009
  6. Junio C HamanoNov 30, 2009
  7. Sverre RabbelierNov 30, 2009
  8. Junio C HamanoNov 30, 2009
  9. Sverre RabbelierNov 30, 2009
  10. Johan HerlandNov 30, 2009
  11. Junio C HamanoNov 30, 2009
  12. Johan HerlandNov 30, 2009
  13. Brandon CaseyNov 30, 2009
  14. Jeff KingNov 30, 2009
  15. Brandon CaseyNov 30, 2009
  16. Johan HerlandNov 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.