Re: [PATCH 4/5] tests: do not require Git to be built when testing an installed Git
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 14, 2018, 05:01 UTC
- Message-ID
- <xmqqa7mcp80u.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <316e215e54b921330b91c763255eb25f475a64ae.1542030510.git.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 5 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > We really only need the test helpers in that case, but that is not what > we test for. So let's skip the test for now when we know that we want to > test an installed Git.
True, but... hopefully we are making sure t/helpers/ has been built in some other ways, though, right? I do not offhand see how tests would work in a pristine checkout with "cd t && sh t0000-*.sh" as t/test-lib.sh is not running $(MAKE) itself (and the design of the test-lib.sh, as can be seen in the check this part of it makes, is to just abort if we cannot test) with this patch (and PATCH 1/5) under the test-installed mode, though.
Show 18 quoted lines
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > --- > t/test-lib.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/t/test-lib.sh b/t/test-lib.sh > index 832ede5099..1ea20dc2dc 100644 > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -51,7 +51,7 @@ export LSAN_OPTIONS > > ################################################################ > # It appears that people try to run tests without building... > -"$GIT_BUILD_DIR/git" >/dev/null > +test -n "$GIT_TEST_INSTALLED" || "$GIT_BUILD_DIR/git" >/dev/null || > if test $? != 1 > then > echo >&2 'error: you do not seem to have built git yet.'