From patchwork Mon Nov 12 13:48:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin via GitGitGadget X-Patchwork-Id: 10678655 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48DD613BB for ; Mon, 12 Nov 2018 13:48:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C179E2989A for ; Mon, 12 Nov 2018 13:48:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2190298BA; Mon, 12 Nov 2018 13:48:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFC242989A for ; Mon, 12 Nov 2018 13:48:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729421AbeKLXl4 (ORCPT ); Mon, 12 Nov 2018 18:41:56 -0500 Received: from mail-pf1-f182.google.com ([209.85.210.182]:41456 "EHLO mail-pf1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729204AbeKLXlz (ORCPT ); Mon, 12 Nov 2018 18:41:55 -0500 Received: by mail-pf1-f182.google.com with SMTP id e22-v6so4357841pfn.8 for ; Mon, 12 Nov 2018 05:48:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=X3VZ2prIFW3RKJU3/gaqkbuQJ1Wekj+1eq8/GZQxnb8=; b=MEiomhggYiMQUY1O6eYVdk2uhK7yhMFTtTwVdtL5hoXHKnkrV3HoagGPB6IO+ilgRq n33/QYVImJOxVfH8YQO/B4EYg5TKpk5owKPwatR1Q+8QbYYwjFlbRc05MYPRJbgLwY+T 0H7XXvH5Kfrfie3QdC3lsu97Vu2CoXVDYKJ70v8C8s3tvbnfbQdSluCVzlPjQDQKSG2u 9SHxqrrhWBWq0ycV5+4fCHwKWg9gBvBaaO3TABjUebvAoydDGtDIF2/Y3qRDAMeglmRe hEeItYYQtfIFuHOEgtYgBraRZcuYXp4wqjBl3az9bmmbRSfPAHBXeu7YSWOgeTpCTJVW vA2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=X3VZ2prIFW3RKJU3/gaqkbuQJ1Wekj+1eq8/GZQxnb8=; b=qy43RpPHOqrWc4GeEWmG2zQpVIa7bD9GZ6kB5OKQOzvBHnyiv9T/EBwPaGfOI8FeYA JB2/0kmqge3qtcRPPGQ0AgUJcbemDVwKbjRssbsRatlI4RVpCriKoS9wdliaS04EEGbz ZcJlmcudZowpshsCiRYFUaglodgZH0lrC8qCrK++bVn0FODYmQ70iPruclbzCr/LUlay UYRm3GntAko8eKVaKtwC1H8X+n5ZM6CDwk6PI/tWvzB47PtEsGB+OlzFZt2sULhDFoD8 /tyy0S7JEjaxj155k8HebdLpSqt7+56qXO+7NSxatiZS/egtLaktbzlgL+oh4oRJ38SE dGqQ== X-Gm-Message-State: AGRZ1gIoNgZ/NUYLd/DvAXKnEBSV+KBAdnsCHHwMQXvPEVIEvKpXoOkX RBC11eUcOQUfnsAGTOfdgfSYLWS1 X-Google-Smtp-Source: AJdET5edjx4yi1YSI8gE0lHf/Jji/8bFC67H7DAyd7glmaOnNVc0rXfRsqSnXosxwZ7FoU7SB4U1Gg== X-Received: by 2002:a63:235f:: with SMTP id u31mr908105pgm.122.1542030513932; Mon, 12 Nov 2018 05:48:33 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id r83sm3151184pfc.115.2018.11.12.05.48.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 05:48:33 -0800 (PST) Date: Mon, 12 Nov 2018 05:48:33 -0800 (PST) X-Google-Original-Date: Mon, 12 Nov 2018 13:48:25 GMT Message-Id: <2b04f9f086e0361345fb38effd61a4b1ef4ac22d.1542030510.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH 1/5] tests: fix GIT_TEST_INSTALLED's PATH to include t/helper/ Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin We really need to be able to find the test helpers... Really. This change was forgotten when we moved the test helpers into t/helper/ 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 47a99aa0ed..832ede5099 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -957,7 +957,7 @@ elif test -n "$GIT_TEST_INSTALLED" then GIT_EXEC_PATH=$($GIT_TEST_INSTALLED/git --exec-path) || error "Cannot run git from $GIT_TEST_INSTALLED." - PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR:$PATH + PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR/t/helper:$PATH GIT_EXEC_PATH=${GIT_TEST_EXEC_PATH:-$GIT_EXEC_PATH} else # normal case, use ../bin-wrappers only unless $with_dashes: git_bin_dir="$GIT_BUILD_DIR/bin-wrappers" From patchwork Mon Nov 12 13:48:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin via GitGitGadget X-Patchwork-Id: 10678659 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B13A13BB for ; Mon, 12 Nov 2018 13:48:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 017E92989A for ; Mon, 12 Nov 2018 13:48:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA5E2298BD; Mon, 12 Nov 2018 13:48:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AAE72989A for ; Mon, 12 Nov 2018 13:48:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729615AbeKLXl5 (ORCPT ); Mon, 12 Nov 2018 18:41:57 -0500 Received: from mail-pg1-f172.google.com ([209.85.215.172]:36836 "EHLO mail-pg1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729460AbeKLXl5 (ORCPT ); Mon, 12 Nov 2018 18:41:57 -0500 Received: by mail-pg1-f172.google.com with SMTP id z17-v6so4111250pgv.3 for ; Mon, 12 Nov 2018 05:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=qICTNpKsUaEsN8WG9M+P2UYZDeBOF/WnA+KAw+W0iLs=; b=Xzt8BJripxvJTp8n7DWN2hp+JfxDpKV33rDBYd7PdEX7IYXXeoshTLkJqwAf+/87nI /h2gG23nbddd5/jnBmsxdy2HSbWx0+cklbTWQodIHvdruufmDcRycFQFUc1QU2B8fMQE /gu75/v5Jbypb4xM1zbc+y75ui1D7yAUQ8AjBUMWrS+gAmEsc0IoX4V1GRfbALzGLU6I EOdZ1cfDJ6S2BteSyQcULDxqL3YijBWSxaxzXQBqra7ckT9tfAOoP6mHQeDGhavMzKeq 2I/haSNMUYmqppBX6J9KjUPjiZslwg/3uCS/EG8y1MYC1I2OFihyKvPL7S/Pc+e+mw77 h52Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=qICTNpKsUaEsN8WG9M+P2UYZDeBOF/WnA+KAw+W0iLs=; b=tv/4Mw5s/99G2Zdv5ZuMlKItfefIcxtxOutm86cw49LtAjuxzRo8xSCXKys0YngwuI n2G2etH0FHn66/jjPgPQFlFA8Rl7SvrrcSCiK9gwRxPrbENt2OJh008FpXMJd0V8M6g8 KnxlT6AfZWerISMvMVh75KxGYoKomK+SlZukFVbAZnS3U6NjN3ZC6YX8PzHUdyawf1gg jgtbIM5vcRIHcv9O1y4dDGok4i5eMDNE2cEGtZHUQGLHD3F930akROhI47GwRW6ZSa1o 09Py7UnDNQN+ki3uoWolG38eTO6fugL4yHE6q4tZ/VmFap+NT/QHyQCbkX3/aKUv9LTf RQJw== X-Gm-Message-State: AGRZ1gJ64Hu7JSqnDMcKwGC76noCsh+Fe4GnQMDyoPE9J5SQC0XGdJ5+ zlHUHKnMT1veMqTQHE5TRY28F7H/ X-Google-Smtp-Source: AJdET5crdTTBS8grwVXKWe/Fr9MoTVV1bvijZ4bzgBzoT2mLKWqyh+Zu8iVTd2S7M8kHLZB/jBam3Q== X-Received: by 2002:a62:6c89:: with SMTP id h131-v6mr1002534pfc.12.1542030515368; Mon, 12 Nov 2018 05:48:35 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id d197-v6sm21609923pga.1.2018.11.12.05.48.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 05:48:34 -0800 (PST) Date: Mon, 12 Nov 2018 05:48:34 -0800 (PST) X-Google-Original-Date: Mon, 12 Nov 2018 13:48:26 GMT Message-Id: <948b3dc146fe353fbab6057c1376fa0e787a444f.1542030510.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH 2/5] tests: respect GIT_TEST_INSTALLED when initializing repositories Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin It really makes very, very little sense to use a different git executable than the one the caller indicated via setting the environment variable GIT_TEST_INSTALLED. Signed-off-by: Johannes Schindelin --- t/test-lib-functions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 78d8c3783b..801cc9b2ef 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -900,7 +900,8 @@ test_create_repo () { mkdir -p "$repo" ( cd "$repo" || error "Cannot setup test environment" - "$GIT_EXEC_PATH/git-init" "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 || + "${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git" init \ + "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 || error "cannot run git init -- have you built things yet?" mv .git/hooks .git/hooks-disabled ) || exit From patchwork Mon Nov 12 13:48:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin via GitGitGadget X-Patchwork-Id: 10678661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5A2D91805 for ; Mon, 12 Nov 2018 13:48:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BF5329894 for ; Mon, 12 Nov 2018 13:48:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F4E3298B2; Mon, 12 Nov 2018 13:48:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB3F9298B1 for ; Mon, 12 Nov 2018 13:48:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729647AbeKLXl6 (ORCPT ); Mon, 12 Nov 2018 18:41:58 -0500 Received: from mail-pl1-f178.google.com ([209.85.214.178]:47095 "EHLO mail-pl1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729460AbeKLXl6 (ORCPT ); Mon, 12 Nov 2018 18:41:58 -0500 Received: by mail-pl1-f178.google.com with SMTP id t13so1428597ply.13 for ; Mon, 12 Nov 2018 05:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=wEV9cIgWs525ZKGNeYbV877/nXZqz6BNojCLkSUJYOg=; b=oCElxX2QICSTNpO2YolKeoEqgHu4wEyNTksj++uzZKqBGTVi5fiiueBHycumFItgSq IneCX1tQ/e+wlTO8Kx6pRa7WWps0Qq4qMEmapthckmgS4SMZ8uK8hUcwJs8teidlhe4g G1jBveP/I1e3S7nOIcYvFp0xODojLxAhSqURX22/e9p4sgUz6UiKRwe4rjrjvWKmXCV5 shzlKyCBow7JA8XiOnyFaH5CnHWW9NISZIKNI/eGi0l60lBMXAaQJOyQT4fZg3D2lkHN 3Vfv3f6ijiyuF9rRmxhlcNYH1WlGD5gDZIgUTWa5WOAikHnkulYyfaiaM+ukatBzAi4r NP6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=wEV9cIgWs525ZKGNeYbV877/nXZqz6BNojCLkSUJYOg=; b=Oux+WlswRAmyC5S0qxaPAq1cDTxIWyaF1YsR/VjQr5Gkw8dL8y3+jdhAySRKFJSUiz 8mSsokyKXtqqbujPUFUmmYPjIbMHGijn1uQwStrFunbYfEQ2ri2yi7zBA9U4RzmD6B8w j61bPgrHmDnrxGVy93/EnuJTZls3WU+Wg5YL55ugs6Nj2YMcA8iV2KO8qD4wq04WArBI 4OrP9W0KDW6Owe7lFfjd5s39OjY+JRDQYzw8NSuPst9YocRAtF+pfs1E5OtkCMkp3NE9 G/YXOq/18skfGHR+w78s26/Gi7ON2o4H7iK5FrT/nsdAI1Ib36aX2etLRRkm5GFt5+Ph JzRg== X-Gm-Message-State: AGRZ1gK6eSOZWvkjwdG1MItGKlQuFJeHDEUhaeO+HYhafpQYyZR0/Qs0 KXa6KHpGap6Eizo6yk7NSlj3EVFd X-Google-Smtp-Source: AJdET5dDm+bMh0y9LPYgDwHTSahOB96YmNseh0qqvkMxy6Cdj6K2v37C2lh6P4C6+8LTr0TUtD1q6g== X-Received: by 2002:a17:902:d697:: with SMTP id v23mr1000428ply.261.1542030516579; Mon, 12 Nov 2018 05:48:36 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id l23-v6sm29125423pfj.179.2018.11.12.05.48.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 05:48:36 -0800 (PST) Date: Mon, 12 Nov 2018 05:48:36 -0800 (PST) X-Google-Original-Date: Mon, 12 Nov 2018 13:48:27 GMT Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH 3/5] t/lib-gettext: test installed git-sh-i18n if GIT_TEST_INSTALLED is set Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin It makes very, very little sense to test the built git-sh-i18n when the user asked specifically to test another one. Signed-off-by: Johannes Schindelin --- t/lib-gettext.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/lib-gettext.sh b/t/lib-gettext.sh index eec757f104..9eb160c997 100644 --- a/t/lib-gettext.sh +++ b/t/lib-gettext.sh @@ -10,7 +10,12 @@ GIT_TEXTDOMAINDIR="$GIT_BUILD_DIR/po/build/locale" GIT_PO_PATH="$GIT_BUILD_DIR/po" export GIT_TEXTDOMAINDIR GIT_PO_PATH -. "$GIT_BUILD_DIR"/git-sh-i18n +if test -n "$GIT_TEST_INSTALLED" +then + . "$(git --exec-path)"/git-sh-i18n +else + . "$GIT_BUILD_DIR"/git-sh-i18n +fi if test_have_prereq GETTEXT && ! test_have_prereq GETTEXT_POISON then From patchwork Mon Nov 12 13:48:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin via GitGitGadget X-Patchwork-Id: 10678663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D73B813BB for ; Mon, 12 Nov 2018 13:48:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49F45298B1 for ; Mon, 12 Nov 2018 13:48:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EB8B2989A; Mon, 12 Nov 2018 13:48:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB4B1298BA for ; Mon, 12 Nov 2018 13:48:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729667AbeKLXmA (ORCPT ); Mon, 12 Nov 2018 18:42:00 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33392 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729460AbeKLXmA (ORCPT ); Mon, 12 Nov 2018 18:42:00 -0500 Received: by mail-pg1-f194.google.com with SMTP id z11so1474593pgu.0 for ; Mon, 12 Nov 2018 05:48:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=gyvYND+Um5aelGgQxY5pWF9JfAP+j8GHDWQ3Jwc47xY=; b=ZRtQj//0V+lszyQGxhYpgOPJcm+Hsk4UczjFsbxsBmOAYWlw9HKKUTr0G6R84+P86+ HaUz467+Lb/HLKKusr4HgrPBHpZDxPHWQoFD9PE6KyoL5NeCXyijxtTK1HMYwg3lmii4 nSxLF5i+6ZI7wN9dRqxZ/h4glhYEidsPqr2CcuQpU/PLRm+/GmEm5X+jqSej1q9FvwHb vqRg49Ytmfi+297zOlVSm1btZ4r7TXAp9nxHfOe3zcBTHBTESeE5RIEX7w5aT+sAu4N/ q2eyO0M1oCIBkm9K+YJGNCyt36KMWWlA/APC9g1b7bKcayBwBT6i9XFGwZPi11ZLv+a5 ZLlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=gyvYND+Um5aelGgQxY5pWF9JfAP+j8GHDWQ3Jwc47xY=; b=d/rjfvnHfQLJ+tRUdHik7tkmLYIAANkC4+joflLJc3Pcn0xX8RLYu+DGzk5rS4nML8 vRkn46VBr/qLoBVVg9eVG48eIkWwqQo1xsuL/Kq72jyF6yKUaJ0vEiQgW7qjxI2w+8XM ILHAcfgUGfq9Vv5u6ZeMjSZbytSycu+DS3nbDgwAu/9pYDcf2EWeedAQnhzkqZeqwmV/ tVBTAdOrobNOowB76MXyuJnaMAloZNKs/Z4hD7GHntujp2IWoNe7ulBU1Js1bpZ+ik9Q cW24Pv3C19LtVE/6ZFe7M3yN34SuJdJH6TccypDO0ClwNJYfq8+6ltmyvf0Tb7j/4kME gF/A== X-Gm-Message-State: AGRZ1gI9S98G82u+G9DS6ZA2tuZltUUlRdwxGbiN4pQNi8H0KQjRValM 6GDmixkTzuZFVTYEu8SXFEV8EnHJ X-Google-Smtp-Source: AJdET5d5trZZexOTH4+H1uM8XKi6InRMOUys50DuB4OuMmzM6q2zU8pDkBBNK3/NeRV5VM6BSKFO8A== X-Received: by 2002:a63:6984:: with SMTP id e126mr894840pgc.143.1542030517798; Mon, 12 Nov 2018 05:48:37 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id o70-v6sm46802411pfo.86.2018.11.12.05.48.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 05:48:37 -0800 (PST) Date: Mon, 12 Nov 2018 05:48:37 -0800 (PST) X-Google-Original-Date: Mon, 12 Nov 2018 13:48:28 GMT Message-Id: <316e215e54b921330b91c763255eb25f475a64ae.1542030510.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH 4/5] tests: do not require Git to be built when testing an installed Git Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. 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.' From patchwork Mon Nov 12 13:48:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin via GitGitGadget X-Patchwork-Id: 10678665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2DEA113BB for ; Mon, 12 Nov 2018 13:48:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C639B298B2 for ; Mon, 12 Nov 2018 13:48:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA5EE2995B; Mon, 12 Nov 2018 13:48:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FE82298B2 for ; Mon, 12 Nov 2018 13:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729719AbeKLXmB (ORCPT ); Mon, 12 Nov 2018 18:42:01 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38099 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729460AbeKLXmB (ORCPT ); Mon, 12 Nov 2018 18:42:01 -0500 Received: by mail-pf1-f195.google.com with SMTP id v76-v6so1539917pfa.5 for ; Mon, 12 Nov 2018 05:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=GRvGJNcAjqDHObFuhezZ2nc2us/1D+U4papYNCoBuNE=; b=T18JVX4R9KNfGeZO/ppGqxV3xjs1iyFCSpdfcGJ3gcuHkuSQpn7NuzEH2/LA9vVuoJ yAuu9MBc2GYTaecYjlfc8rx2fP0cJ+ROAWOEwLpeHArB1+EA43jX0XVYHzHsaeb2u1cA h1bLgJ36cBq6IA42+0EwFuALAjfYpqISK3ApkxH+tGlaTyRSGE/dwwWQ3ka2+dXDNenV XOVL1V33GsL25o5trDKETIZy4G9RdeRE1jM7qWEisAEpIh/YZgs7lYs9X6PPgNkwu4Ke JUqd771KyiEgeLvaLVVOR+w3EGtkCO3YWcVqOQJY346PwrFwZEeQhV3kgck5apLumOxn uwGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=GRvGJNcAjqDHObFuhezZ2nc2us/1D+U4papYNCoBuNE=; b=kZZP4snISjpDwQ/pchuoug6OGr4E1E+g6eYZj/wVh37blkplcuI3ndHhg+rmIQRVbV 1BmnrRzdqt6K1lq6fJHL6AxWk30d+69v/QrfqbVODjBMM3Nus06y+qEH+/MUwntw/dGW ADiU71baVJ5EC0lToTRe3SRFUMnZb/5xw2eGPlLncJeh8F7edBVbUYhqL0Gl1/ZgaQFZ WDjcs1Dkm1yLlXWDDIrPAiaH6nbaqhE2rW0S5GU0wac/cqF7UzIxrCKX4C3faBOTuGE0 nqJP+lnxDfFIXfgMc3XR44zc8gC855fl6IfZTkU4m0TdVk+70lfT7MhpzVeX79KbD5Vy 3sEA== X-Gm-Message-State: AGRZ1gL7xr0mMB5K2nRyWyQ8FQ2vj+SfgtHkWLhHw68xCV/A6ZYtKuJj AcELqCcXNo7NnzR+LDFUTx3WnnVo X-Google-Smtp-Source: AJdET5fzWHOcG5fWCgP5EQr6NsezcnwCIa1qXPrQiD6HLP9Cx20ySuWhPYl0bLsQZ7J7QZL00Y5HWw== X-Received: by 2002:a63:5442:: with SMTP id e2-v6mr909778pgm.316.1542030519176; Mon, 12 Nov 2018 05:48:39 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id p5-v6sm13712735pfb.109.2018.11.12.05.48.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 05:48:38 -0800 (PST) Date: Mon, 12 Nov 2018 05:48:38 -0800 (PST) X-Google-Original-Date: Mon, 12 Nov 2018 13:48:29 GMT Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH 5/5] tests: explicitly use `git.exe` on Windows Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin In the bin-wrappers/* scripts, we already take pains to use `git.exe` rather than `git`, as this could pick up the wrong thing on Windows (i.e. if there exists a `git` file or directory in the build directory). Now we do the same in the tests' start-up code. This also helps when testing an installed Git, as there might be even more likely some stray file or directory in the way. Note: the only way we can record whether the `.exe` suffix is by writing it to the `GIT-BUILD-OPTIONS` file and sourcing it at the beginning of `t/test-lib.sh`. This is not a requirement introduced by this patch, but we move the call to be able to use the `$X` variable that holds the file extension, if any. Note also: the many, many calls to `git this` and `git that` are unaffected, as the regular PATH search will find the `.exe` files on Windows (and not be confused by a directory of the name `git` that is in one of the directories listed in the `PATH` variable), while `/path/to/git` would not, per se, know that it is looking for an executable and happily prefer such a directory. Signed-off-by: Johannes Schindelin --- Makefile | 1 + t/test-lib-functions.sh | 2 +- t/test-lib.sh | 13 +++++++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bbfbb4292d..5df0118ce9 100644 --- a/Makefile +++ b/Makefile @@ -2590,6 +2590,7 @@ GIT-BUILD-OPTIONS: FORCE @echo NO_UNIX_SOCKETS=\''$(subst ','\'',$(subst ','\'',$(NO_UNIX_SOCKETS)))'\' >>$@+ @echo PAGER_ENV=\''$(subst ','\'',$(subst ','\'',$(PAGER_ENV)))'\' >>$@+ @echo DC_SHA1=\''$(subst ','\'',$(subst ','\'',$(DC_SHA1)))'\' >>$@+ + @echo X=\'$(X)\' >>$@+ ifdef TEST_OUTPUT_DIRECTORY @echo TEST_OUTPUT_DIRECTORY=\''$(subst ','\'',$(subst ','\'',$(TEST_OUTPUT_DIRECTORY)))'\' >>$@+ endif diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 801cc9b2ef..c167b2e1af 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -900,7 +900,7 @@ test_create_repo () { mkdir -p "$repo" ( cd "$repo" || error "Cannot setup test environment" - "${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git" init \ + "${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git$X" init \ "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 || error "cannot run git init -- have you built things yet?" mv .git/hooks .git/hooks-disabled diff --git a/t/test-lib.sh b/t/test-lib.sh index 1ea20dc2dc..3e2a9ce76d 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -49,18 +49,23 @@ export ASAN_OPTIONS : ${LSAN_OPTIONS=abort_on_error=1} export LSAN_OPTIONS +if test ! -f "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS +then + echo >&2 'error: GIT-BUILD-OPTIONS missing (has Git been built?).' + exit 1 +fi +. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS +export PERL_PATH SHELL_PATH + ################################################################ # It appears that people try to run tests without building... -test -n "$GIT_TEST_INSTALLED" || "$GIT_BUILD_DIR/git" >/dev/null || +test -n "$GIT_TEST_INSTALLED" || "$GIT_BUILD_DIR/git$X" >/dev/null || if test $? != 1 then echo >&2 'error: you do not seem to have built git yet.' exit 1 fi -. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS -export PERL_PATH SHELL_PATH - # if --tee was passed, write the output not only to the terminal, but # additionally to the file test-results/$BASENAME.out, too. case "$GIT_TEST_TEE_STARTED, $* " in