From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id BE74B1F87F for ; Wed, 14 Nov 2018 13:20:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732801AbeKNXXi (ORCPT ); Wed, 14 Nov 2018 18:23:38 -0500 Received: from mout.gmx.net ([212.227.15.18]:59449 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728249AbeKNXXi (ORCPT ); Wed, 14 Nov 2018 18:23:38 -0500 Received: from [192.168.0.129] ([37.201.193.149]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MNIi1-1gPQ3m0dth-006ybd; Wed, 14 Nov 2018 14:20:19 +0100 Date: Wed, 14 Nov 2018 14:20:18 +0100 (STD) From: Johannes Schindelin X-X-Sender: virtualbox@gitforwindows.org To: Junio C Hamano cc: Johannes Schindelin via GitGitGadget , git@vger.kernel.org Subject: Re: [PATCH 4/5] tests: do not require Git to be built when testing an installed Git In-Reply-To: Message-ID: References: <316e215e54b921330b91c763255eb25f475a64ae.1542030510.git.gitgitgadget@gmail.com> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K1:j/Av4Fs1sNqf7qkzjnmKU8IhPuNR+bqp/psH148130y1utcYJ67 io0/ZgpC6PGuurRqjNDES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DAn31U+/V6dpGLui9n 4VihSUcdx9KGCt/TFHZRLxohStmT16axXTdBPtBAL3PukwcSfTjdMwc7oDGHMtN1ahK4LdWG/ 11VXdWLOxag== Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Junio, On Wed, 14 Nov 2018, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > From: Johannes Schindelin > > > > 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? We do it implicitly, in the test cases that use the helpers. However, t/test-lib.sh does not particularly verify that the test helpers have been built. And I think that is a good thing: we do have several test scripts, I would think, that do not require any test helper to begin with. These scripts can work pretty well without having to build anything (read: on a machine where there is not even a toolchain available to build things). Besides, it is pretty much only t/helper/test-tool these days, and it is unlikely that anybody has a `test-tool` in their `PATH`. If they do, they'll find out soon enough iff they test with `GIT_TEST_INSTALLED` and iff they do not have the test helper(s) in t/helper/ ;-) Ciao, Dscho > 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. > > > Signed-off-by: Johannes Schindelin > > --- > > 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.' >