From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-2.6 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 3238120C31 for ; Fri, 8 Dec 2017 15:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753848AbdLHPI0 (ORCPT ); Fri, 8 Dec 2017 10:08:26 -0500 Received: from mout.gmx.net ([212.227.15.19]:55655 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753542AbdLHPI0 (ORCPT ); Fri, 8 Dec 2017 10:08:26 -0500 Received: from virtualbox ([37.201.193.73]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LpcBS-1f1M2s3fT4-00fRah; Fri, 08 Dec 2017 16:08:20 +0100 Date: Fri, 8 Dec 2017 16:08:19 +0100 (CET) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Jeff King cc: git@vger.kernel.org, Lars Schneider , Stefan Beller Subject: Re: [PATCH v2 4/4] t/Makefile: introduce TEST_SHELL_PATH In-Reply-To: <20171208104722.GD4939@sigill.intra.peff.net> Message-ID: References: <20171208104647.GA4016@sigill.intra.peff.net> <20171208104722.GD4939@sigill.intra.peff.net> 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:K0:IqW/HYV2+eqz/OUqpn0wukb8ZCYpozw7h1vFSv7SwFyMV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o6Y30WWDoLcwgnKPO0A= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Peff, the other three patches look good to me. On Fri, 8 Dec 2017, Jeff King wrote: > You may want to run the test suite with a different shell > than you use to build Git. For instance, you may build with > SHELL_PATH=/bin/sh (because it's faster, or it's what you > expect to exist on systems where the build will be used) but > want to run the test suite with bash (e.g., since that > allows using "-x" reliably across the whole test suite). > There's currently no good way to do this. > > You might think that doing two separate make invocations, > like: > > make && > make -C t SHELL_PATH=/bin/bash > > would work. And it _almost_ does. The second make will see > our bash SHELL_PATH, and we'll use that to run the > individual test scripts (or tell prove to use it to do so). > So far so good. > > But this breaks down when "--tee" or "--verbose-log" is > used. Those options cause the test script to actually > re-exec itself using $SHELL_PATH. But wait, wouldn't our > second make invocation have set SHELL_PATH correctly in the > environment? > > Yes, but test-lib.sh sources GIT-BUILD-OPTIONS, which we > built during the first "make". And that overrides the > environment, giving us the original SHELL_PATH again. ... and we could simply see whether the environment variable TEST_SHELL_PATH (which we would set in t/Makefile from the passed-in SHELL_PATH) is set, and override it again. I still think we can do without recording test-phase details in the build-phase (which may, or may not, know what the test-phase wants to do). In other words, I believe that we can make the invocation you mentioned above work, by touching only t/Makefile (to pass SHELL_PATH as TEST_SHELL_PATH) and t/test-lib.sh (to override the SHELL_PATH from GIT-BUILD-OPTIONS with TEST_SHELL_PATH, if set). Ciao, Dscho