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

Re: [PATCH] tests: handle NO_PYTHON setting

From
BCBrandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Date
Nov 30, 2009, 18:07 UTC
Message-ID
<0OMCWm31DRbUGCfPIS6SSJn59HQIM9AKtSDgVSNdiSR99clfmJ3D-Q@cipher.nrlssc.navy.mil>
In-Reply-To
<20091130075221.GA5421@coredump.intra.peff.net>
Jeff King wrote:
Show 42 quoted lines
> 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

Shouldn't this section be moved down below the sourcing of ../GIT-BUILD-OPTIONS on line 656 so that the value of NO_PYTHON will be available when running the test scripts directly?

-brandon
ps. There's something eerily familiar about this patch.
Previous: Johan HerlandNext: Jeff King
Message 13 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.