Re: [PATCH] tests: handle NO_PYTHON setting
- From
- Brandon 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 GITPYTHONLIBShouldn'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.