From patchwork Wed Nov 14 16:32:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Passaro via GitGitGadget X-Patchwork-Id: 10682925 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 BE8D017F3 for ; Wed, 14 Nov 2018 16:32:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B188B2964C for ; Wed, 14 Nov 2018 16:32:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A62502BBC1; Wed, 14 Nov 2018 16:32:08 +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 5B3622BBBD for ; Wed, 14 Nov 2018 16:32:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728782AbeKOCgB (ORCPT ); Wed, 14 Nov 2018 21:36:01 -0500 Received: from mail-pg1-f175.google.com ([209.85.215.175]:41268 "EHLO mail-pg1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727576AbeKOCgA (ORCPT ); Wed, 14 Nov 2018 21:36:00 -0500 Received: by mail-pg1-f175.google.com with SMTP id 70so7594489pgh.8 for ; Wed, 14 Nov 2018 08:32:06 -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=Yy4nigKKZpgnU4xJHGacEUOU08cSb1SS5qaLPu1X+uA=; b=Z0f+YiK5c8oI3pCh3L5duneO7QALiO8GFpzTjoxmrAOsUfSwbVzIXpFVcczXEp1r9L nqwIRQiXXaZZds57SYZeiJjQbuQxIq7SOif9dEQBizwJgR1+yFR5T3SOIhZYEomtFj+L 0B/WbUs/HHJ556rNFMoONzhkirl320SgvC2/ckBTaRk78Di0EZNic+w6S0oylmCALjNQ Y9pn6fLIvrsBiquJbOlVepXSPuyQytlNFb6k1JFWEaU2RjvTQfTo3PCH9fSW0zYVnAN2 y97fwALF5cToB2ZqB0OlzZPr0nu/fSN4HWxODXGK8pw4rA3rVThBXN+Qkrb9HjfSrOjH 0LbQ== 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=Yy4nigKKZpgnU4xJHGacEUOU08cSb1SS5qaLPu1X+uA=; b=a0bFWLvIjQtXkdJl6kQAYf8/qgIgE23CNFclshG144azqqjatWsdNghIsxrX+GC1kY F7hie3t7SBitvF7hirwlBrrLTzaifDFRgyUMBSk+ym7lSAxBuOZAOsRvBNL9TLwjw4PP CAq2TYHPr/1Vg52w1GsTaUutO2oOhdbIx6zqhEjTWVpAbdsSxMUmYxIGo9+3FtNOrV3/ gfFekIgoouql7B8jaIOd65cOz3iV/6QofYhBcNlD3o2ZQ82JEpQEW61ze9DZRBQLl+GT 1PdNU5Z1yBXoXB5XsfukzILeKkgEGngMtaY9XtqtakDyre/ypc9XkC79O7XNipYlY4Az B03w== X-Gm-Message-State: AGRZ1gKR96JfBBr1TfX1fnH95x8XYMumV8oSBd+yC5FEH9liL4f0Eiwk uZljBISf/J+IrZO/MAk8x+5VR993 X-Google-Smtp-Source: AJdET5fz97EtdgXq2MPaCycdSPByOf2hBabXHQl8DpZyPqn6zmcryiaST2iSiiLnS456w0k30NhF3w== X-Received: by 2002:a63:d52:: with SMTP id 18-v6mr2404788pgn.107.1542213125336; Wed, 14 Nov 2018 08:32:05 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id b62-v6sm26744706pfa.159.2018.11.14.08.32.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 08:32:04 -0800 (PST) Date: Wed, 14 Nov 2018 08:32:04 -0800 (PST) X-Google-Original-Date: Wed, 14 Nov 2018 16:31:56 GMT Message-Id: <3b68e0fe8aeb53e39df9862a5db3b414ed578824.1542213121.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH v2 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 aba66cafa2..93883580a8 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 Wed Nov 14 16:32:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Passaro via GitGitGadget X-Patchwork-Id: 10682929 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 4A964109C for ; Wed, 14 Nov 2018 16:32:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DD6A2BB8A for ; Wed, 14 Nov 2018 16:32:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3117C2BBAF; Wed, 14 Nov 2018 16:32:10 +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 D63D92BB8A for ; Wed, 14 Nov 2018 16:32:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732702AbeKOCgD (ORCPT ); Wed, 14 Nov 2018 21:36:03 -0500 Received: from mail-pf1-f182.google.com ([209.85.210.182]:44287 "EHLO mail-pf1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727576AbeKOCgC (ORCPT ); Wed, 14 Nov 2018 21:36:02 -0500 Received: by mail-pf1-f182.google.com with SMTP id b81-v6so7670499pfe.11 for ; Wed, 14 Nov 2018 08:32:08 -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=oNV8UiGiwAct+iHzKGIcS9LqhFUFPULDWaZ8+DGn014=; b=p8ARTVi0RAo3X8yL3D5dDBXb7UtMbdlxCE9yf7KeLvXTy4oV6PegMzzCmXYg+TQBqE nS7VY6ogXXpJHOK9V5AYkEOWGXelinb2UeEGczPx/eLvSZTQDOyzQ8+4Bv2/Bjjd4PNX Njox1z3tya/UCzBcNBl0lLOzW5N9R24Y0C+xmb+e4aL64AnAJSNQYSGl5vPup85cMd7D EdQRxT6fFATOhniAJZ6OT6n4/0+Xlh8INthYzu+Eh9jTNuIFkd9ySDhZTgWAo2mZ6Vlj 3eud5I4BUICL+COAMVeES5l+7gAOvhBC/fQfu3tW9+TmteK1Rq+A3tG+tXEiQP+XTdz4 ttAg== 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=oNV8UiGiwAct+iHzKGIcS9LqhFUFPULDWaZ8+DGn014=; b=K/qwYTRRZnbgEbQ4CXSgHNksvETX89o4C6X3QfOO7GdhEmIG54f10y9v9k1LV9Ouve cNdZLp3g4AGjWxyBAbK9mVQom76AGKX3Kfbvirh77N3NnXmF0VHUox5CU/fGf9L3TzFl jOObgBRVaqWSKJSkBBG6MBxc4fORgxIgNp1aq/jsf54d+qkUzzWTJKVE+lXKiJ1Cy1EF Hm3MNcsvGPIRHn9xeUbnI6di6WrOJTWWihH1p9skwnzAEoj6MZ6xO6uTszp/OghWcI3o F6ZyDXDf7Uq5A7y6Q+emBlcRjp21DrV0qcr/ithipGMjWUjz/1hIcHvdGOKqdRYkow1z fYIg== X-Gm-Message-State: AGRZ1gJdXJxySJKi0wh7K+HOdVNxP9rVZhVU6dGIFHkp6eIcToPkZbOx tvhUw7oXEWm2QztF1D6Lr03ZWqE1 X-Google-Smtp-Source: AJdET5e/JGIMKERKQmEhro97XyF23SxWDIbgq2X4NXHtrxa/Nf3QAToQdcjtliuwNlXS8Kq6WxNztQ== X-Received: by 2002:a62:22c3:: with SMTP id p64-v6mr2714937pfj.9.1542213127222; Wed, 14 Nov 2018 08:32:07 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id i4sm5978668pfj.82.2018.11.14.08.32.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 08:32:06 -0800 (PST) Date: Wed, 14 Nov 2018 08:32:06 -0800 (PST) X-Google-Original-Date: Wed, 14 Nov 2018 16:31:57 GMT Message-Id: <80d50d5932779592a1ea92d0b13e8d0429453128.1542213121.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH v2 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 d158c8d0bf..3472716651 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -923,7 +923,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 Wed Nov 14 16:32:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Passaro via GitGitGadget X-Patchwork-Id: 10682931 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 5F037109C for ; Wed, 14 Nov 2018 16:32:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 521C02BBC1 for ; Wed, 14 Nov 2018 16:32:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 466972BBBD; Wed, 14 Nov 2018 16:32:12 +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 EF2AF2BBAF for ; Wed, 14 Nov 2018 16:32:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732965AbeKOCgF (ORCPT ); Wed, 14 Nov 2018 21:36:05 -0500 Received: from mail-pl1-f179.google.com ([209.85.214.179]:46241 "EHLO mail-pl1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727576AbeKOCgE (ORCPT ); Wed, 14 Nov 2018 21:36:04 -0500 Received: by mail-pl1-f179.google.com with SMTP id t13so5060718ply.13 for ; Wed, 14 Nov 2018 08:32:10 -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=AVTrRYMBh+/sIYz1LW6eivzV9xw1jlm6xGbLSUFCXkZzW+vaPFIMNlED5PT5RT2O8y Vn8C7G6vnv0i0MKBxf8APO+THB6shZaXz6Gkzv/EYsuatXlLym6byOXAaiOOOLgfd/CX viP1c/lsUuTFPfEFR5FinwJOozgFrZiyVic+nohdNzy38tqaygD9BgG7V57Nl+cwFWmC UXJkuvIkiyl4mbJXN7XHH7ifNK0cPRtv6BZPrMJyCyuunU8Y7ZGY86X5j3WlRQiAxQGe ZN9oGgu7fcV2/kfzuSknu/F/iUGvVICq7uPMKuTJomc5FWSrMmwC5InYucIavmauRip5 sJEg== 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=HZMnTUNylmHUjsZjgMynEPxrNJYz2CXMHUAu+mr/35ziCejXxdL3Oq3SBFrQXBnhUA jIrp/MMT8bifXDP8TxncufvSsXVtc6+YcGF5pu60auKIfnWDtwbvLktA0beRwIH0mbeV 7zgyV8i9c7uPsqrywYaLtH4D1+Nf5hoD35yNfKoCX8j3XD0QwCKIjH5TeYjkqqjxzgwg DfLni3/Bu2d2gXosiAuKqles34eEi6vRm8C7eVyM0iltGoeBwcqdmhsQ8HpBPSuhY10T +XWtZNmGOlM2X8Pouf1ElTcsLv6D806HIf+Qm7uWwWqj7fo635h0/Y6VB54P12gipu9w jCtQ== X-Gm-Message-State: AGRZ1gJhOLOYl8ALLUGfV13cCUcci2lpWXcvO1dQuCELIm39rX0thd5f DZp18ntOcQ2hCAY9BJ0B78sjqjO2 X-Google-Smtp-Source: AJdET5eIbaW5Jt2G4hLaAaPvm/A6cp5rztXiBs6TttmkA2QKnB08J3N8NDjPbsxSV20Rtz2GC0Ikxw== X-Received: by 2002:a17:902:768b:: with SMTP id m11mr2658681pll.80.1542213129588; Wed, 14 Nov 2018 08:32:09 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id x23-v6sm23698374pfm.126.2018.11.14.08.32.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 08:32:08 -0800 (PST) Date: Wed, 14 Nov 2018 08:32:08 -0800 (PST) X-Google-Original-Date: Wed, 14 Nov 2018 16:31:58 GMT Message-Id: <49e408677ad8e1b34e4b13a5eb759b1ead69cd50.1542213121.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH v2 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 Wed Nov 14 16:32:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Passaro via GitGitGadget X-Patchwork-Id: 10682933 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 6B4B6109C for ; Wed, 14 Nov 2018 16:32:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C1532BBC1 for ; Wed, 14 Nov 2018 16:32:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5038C2BB8E; Wed, 14 Nov 2018 16:32:14 +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 F330A2BB8B for ; Wed, 14 Nov 2018 16:32:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733291AbeKOCgH (ORCPT ); Wed, 14 Nov 2018 21:36:07 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44495 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727576AbeKOCgG (ORCPT ); Wed, 14 Nov 2018 21:36:06 -0500 Received: by mail-pg1-f195.google.com with SMTP id w3-v6so7580673pgs.11 for ; Wed, 14 Nov 2018 08:32:11 -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=5yf6kjv1ZWqr/Qa47VR28fELsLqQ5bG3RA5QipW5P0A=; b=FWGSb/ceWmNI8I5CtuXEVUQQlGPjbjUD+Tt8x8MgkKZ4rYWuu/qs3e0HB+F7ojPyoW 32Wk1cvkl+ZjButeTRv1iXWnqv7F5sNnXUOVOUzP/Tj8TjjBF0onLecrq5zyJtiQd/Ct 4oKfqudseMYs0vungW9qZKVuMqwwS64XT4h8gqB8Oq6TwU4qYM7y7Yvp63YdYOnU39XA PGhkrWd99CXVmytNeZ1TzapOiCBf9jyrGhCPUIBY9HboWUA6aiCQxEp7FcoUgLJgC7tf aH8aMap/wzkXg0eUsTms9WlISiorhD8UXI+r+cn11pVrWYT+u4f1ZgfTT/T+WAtZ+q8L evMw== 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=5yf6kjv1ZWqr/Qa47VR28fELsLqQ5bG3RA5QipW5P0A=; b=IrCZWbdrmuKXl9i1Fu31yZVm1xamCubmvPsmY5VJEd8hNWTf8rdmmCJfb9yUI/Rekp YoMfrU7YLEz9d/Gtyy97JfClmZ/DEf4VfB5FjIqkesx2MY7T3BGFSrZRfnlFj6LrshtQ Ze7MEf+9hlDSSrEtz9TAKVZxcfiq+RaMcZKsqL5FDt2y8EJlmamlNtyaS6pKC+DAhkbh NarzLDV9Hxs4kdR5icdRBYAxdYI2rcwtV2zce1is8NPgjvl4Ky9cNchlKoPK6ztq+Z8h mzhq06IY7eN1iHfmwC8s1sd/SrBgVwswTvD8p77Xsi0NGE+3BCORFEB3wnGE7HCruH2k Or1A== X-Gm-Message-State: AGRZ1gL4NiANcVJgKGYc+AzT/CgIRXt3TJ7u1z4G8d0WA/xeyaUuNACv eTcdEz9mNS1girfSbwcRF7HxBXw7 X-Google-Smtp-Source: AJdET5cGfdsBnpyuAcIhI4Kbcgv7xQdmWmyB/QLClQZy+/EGUOUpFcJrsPmKKxLfy86z85bC7jU9tA== X-Received: by 2002:a65:448a:: with SMTP id l10mr2352107pgq.387.1542213131128; Wed, 14 Nov 2018 08:32:11 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id v5sm27526375pgn.5.2018.11.14.08.32.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 08:32:10 -0800 (PST) Date: Wed, 14 Nov 2018 08:32:10 -0800 (PST) X-Google-Original-Date: Wed, 14 Nov 2018 16:31:59 GMT Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH v2 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 to be built in the worktree in that case, but that is not what we test for. On the other hand it is a perfect opportunity to verify that `GIT_TEST_INSTALLED` points to a working Git. So let's test the appropriate Git executable. While at it, also adjust the error message in the `GIT_TEST_INSTALLED` case. This patch is best viewed with `-w --patience`. Helped-by: Jeff King Signed-off-by: Johannes Schindelin --- t/test-lib.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 93883580a8..3d3a65ed0e 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -51,10 +51,15 @@ export LSAN_OPTIONS ################################################################ # It appears that people try to run tests without building... -"$GIT_BUILD_DIR/git" >/dev/null +"${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.' + if test -n "$GIT_TEST_INSTALLED" + then + echo >&2 "error: there is no working Git at '$GIT_TEST_INSTALLED'" + else + echo >&2 'error: you do not seem to have built git yet.' + fi exit 1 fi From patchwork Wed Nov 14 16:32:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Passaro via GitGitGadget X-Patchwork-Id: 10682935 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 0F32713BB for ; Wed, 14 Nov 2018 16:32:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01E112BB8B for ; Wed, 14 Nov 2018 16:32:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA4D02BBC4; Wed, 14 Nov 2018 16:32:15 +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 7743A2BBC1 for ; Wed, 14 Nov 2018 16:32:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387413AbeKOCgI (ORCPT ); Wed, 14 Nov 2018 21:36:08 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44481 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727576AbeKOCgI (ORCPT ); Wed, 14 Nov 2018 21:36:08 -0500 Received: by mail-pf1-f193.google.com with SMTP id b81-v6so7670652pfe.11 for ; Wed, 14 Nov 2018 08:32:13 -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=3LSPBuw1rb6z4HYBe3YhQ+d48D3Re4GYJid+0SHPCjc=; b=LLvgHh+9vYy32sIqWDfFq7CyHEluI/rUHRheYrfqDnqkZJYNjugSdUbuqPh92lyrjm 2Wi+BqnIgqH2WHSEAy+NcqTFyNEwWcDb7i6zrXFdPv5WHJqhLndyuPWOXsaR1unIN/Oy QUyg+QDc0mTxR5Mio8kE1eY0ClwTVnranqMg8IWDDDmdCgCwB5M8Wr0H80Tyz3AQ+0FS 68GK2lHcPUbVRnHUSv0Kha/MxptR+aR2AchgSKtNa0fIw7ChdbEYAUHxALz8d4TsW3p/ 6knINkvyJJWIBtA4emDS/CaEoCJY05QWiT06tHAU3j0aeY1zX6+X9M9UnfSxUo+h+Kgw RhoA== 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=3LSPBuw1rb6z4HYBe3YhQ+d48D3Re4GYJid+0SHPCjc=; b=IjkrWy7J2VS2plQYTKMYMobh/XLCwTbTJBuPaanX/Z7SC6mflSDutBWNZSVHxRS0yE a79e25+P8aJFgA7eA+Zn5il6IYFg5MJT7oo/OqGJp3sPIjVzIOI08yQPYS+xV04ieQ/C /PT9ga7I6Gr9AEXhaCqHAk2Ekz8uIFHev4hUJCCzJjtC4UHCL3D2fDm/Jr5lAzuS2B9H FxQdodFcuLmP9ycTEXnrDcW3chrAxlNwIq9zcdJnhqBWytH/SU2kWMex9J8nErWzrtfS 4UTJctBAs18fNagHAC0HTjbEqpMoDj9iDCGEQsHq/gkSJpS3/6akwIly8KaJhlUSx7wQ 1mCA== X-Gm-Message-State: AGRZ1gKsD0F59w+9w8mduT+SbgAbizTELSjCrI0v4gfAYTpLSm/MMC5j gxLO+Bv9spQE6SGOZFywin9whj6Q X-Google-Smtp-Source: AJdET5cnSjlaUjP5PUSrUOtFWa8aLCMb5ahGH+A2vMo7nzhXNSrqxi902CpNkCqjS5B8qgmmqpWJOQ== X-Received: by 2002:a63:4187:: with SMTP id o129mr2210707pga.370.1542213132770; Wed, 14 Nov 2018 08:32:12 -0800 (PST) Received: from [127.0.0.1] ([40.112.139.188]) by smtp.gmail.com with ESMTPSA id m3sm44130939pgl.69.2018.11.14.08.32.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 08:32:11 -0800 (PST) Date: Wed, 14 Nov 2018 08:32:11 -0800 (PST) X-Google-Original-Date: Wed, 14 Nov 2018 16:32:00 GMT Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH v2 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 On Windows, when we refer to `/an/absolute/path/to/git`, it magically resolves `git.exe` at that location. Except if something of the name `git` exists next to that `git.exe`. So if we call `$BUILD_DIR/git`, it will find `$BUILD_DIR/git.exe` *only* if there is not, say, a directory called `$BUILD_DIR/git`. Such a directory, however, exists in Git for Windows when building with Visual Studio (our Visual Studio project generator defaults to putting the build files into a directory whose name is the base name of the corresponding `.exe`). 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 016fdcdb81..21b3978744 100644 --- a/Makefile +++ b/Makefile @@ -2591,6 +2591,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 3472716651..274cbc2d6e 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -923,7 +923,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 3d3a65ed0e..e12addc324 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -49,9 +49,17 @@ 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... -"${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git" >/dev/null +"${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X" >/dev/null if test $? != 1 then if test -n "$GIT_TEST_INSTALLED" @@ -63,9 +71,6 @@ then 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