From patchwork Wed Nov 17 09:04:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Stelzer X-Patchwork-Id: 12624015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55ED7C433F5 for ; Wed, 17 Nov 2021 09:04:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3763861BC1 for ; Wed, 17 Nov 2021 09:04:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234603AbhKQJHZ (ORCPT ); Wed, 17 Nov 2021 04:07:25 -0500 Received: from mail-ve1eur01hn2212.outbound.protection.outlook.com ([52.100.7.212]:1921 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233046AbhKQJHX (ORCPT ); Wed, 17 Nov 2021 04:07:23 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k8covZ/LFytHuBGsCR5R0kdGy+P59gQNFc9wT28jCmI+DOofpnzYbNedg0ejrynH3PAPd4JtwzaTywCeuOu+Jg1xZi/Ze9V8xZCFm/OIt00r38gzOYUi9TyJ55wzC1sxPSetMfT7lzfwRBkjT5cJ8cdH+EqDa4P628S1Fd8nLy8s0yo4emBjGgHJzLqNAoweoqOWSchS/SHNrnRJwTjY3AMFruwYMWir7wIttiUWBvaXrt0lDem7Lm/mhZ6qU3UzFxL63BRJ8WFCMPG7pwpjPettRgXE2I9lfcwaN+Twwv5+Urys6prgjFRsa9oFbxzN2FFG1b+C9S/mN44sQNxAYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GjBgYgfwlF4KxFyFSDqBz1Faeop6ykZ2ISzQgaSPc9s=; b=aHKERHdGeadzU6rNA9ilfAgHmTg82MRedp0eByfvr5JFvs7c6cN3dPLDPkvaHehF0NzTWWc6ukiM6GfyTXPfc1mr1V3kLxjtjNURyoVOfM7Ku2r5mUftx8ummsbxNgGTK8oFTDh/YPukBnnAGYpJ0iD+BnHMALwKaPz864wC8q0pXhrEnuQo1HTIv2iXXq/J9sOU0lx17SLUufyEsPamcjmZ+Xt/+hvvg9ozlXBoV2QdjodXt5xWtyEXVpReQJdnqm41WG1ZJMS31BBQdjDjoST42Ueic9IKW+Hzb8dcTFnhn1N8Ny2+L4tN9E3sbMZ/xzz3rwYH/aypNURKwzTXTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=gigacodes.de; dmarc=pass action=none header.from=gigacodes.de; dkim=pass header.d=gigacodes.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gigacodes.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GjBgYgfwlF4KxFyFSDqBz1Faeop6ykZ2ISzQgaSPc9s=; b=Iz+qeRdoOjVqruYj02dNWiEWqls0sM8voRL1MU6PZ9NBP1DC5yyqwzTso9nQd0/x0bmY2PHMY60ZG3Hkg40TqGb3q0zcZOGXr0+z+pdVDcBlqEP0vW02LudanD6fBLM607pljkhDV2R0Dxbd/ll3A9cLHch699X3o+wnP0pvjkQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=gigacodes.de; Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) by PR3PR10MB3849.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:43::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.27; Wed, 17 Nov 2021 09:04:22 +0000 Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::f9d5:61ab:5756:b391]) by PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::f9d5:61ab:5756:b391%5]) with mapi id 15.20.4713.020; Wed, 17 Nov 2021 09:04:22 +0000 From: Fabian Stelzer To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Adam Dinwoodie , Jeff King , Junio C Hamano , Fabian Stelzer Subject: [PATCH v2 1/2] test-lib: show missing prereq summary Date: Wed, 17 Nov 2021 10:04:09 +0100 Message-Id: <20211117090410.8013-2-fs@gigacodes.de> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211117090410.8013-1-fs@gigacodes.de> References: <20211117090410.8013-1-fs@gigacodes.de> X-ClientProxiedBy: AS8P251CA0019.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::22) To PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) MIME-Version: 1.0 Received: from localhost (2003:ea:5820:600:c042:75a0:fd5e:1472) by AS8P251CA0019.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Wed, 17 Nov 2021 09:04:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 23237929-fd0d-4fb8-defb-08d9a9a93f4f X-MS-TrafficTypeDiagnostic: PR3PR10MB3849: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microso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X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:5;SRV:;IPV:NLI;SFV:SPM;H:PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:OSPM;SFS:(4636009)(366004)(39840400004)(136003)(396003)(346002)(376002)(66946007)(66476007)(66556008)(186003)(54906003)(38100700002)(107886003)(6666004)(508600001)(316002)(8676002)(8936002)(5660300002)(2616005)(36756003)(6916009)(6496006)(2906002)(86362001)(1076003)(52116002)(6486002)(83380400001)(4326008)(23200700001);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6rwz7gja6/RVjz4INUhcHKGn6105mnfrYYTSFFVm+TcTVNGoxNSFrhl2ea1WNYK1DUxHXtsrmZsNg2gPu5MTtXG6AkuIyzXBnnRta2ecxQQudsuDC4RdyEOrElsZfCjMWe0ZiqNEsUuGl7e62DU6rZ2LJFHBxcLmnG8N/qgTO/lPVvMr/01WtZY9aWEx//EsRq93gaqwthN01trKeK4vlHenWVGtWvVLmgP2+Kh4UIheM2GdFG2vY4UP+85iLHYWAWLE2Rke5dxaHLY4rfsoSkTC67eZ8h/Max0HmwnnPk1DtIRVLQwG/qDm+uNBhU1yQwzi/w9m8NSLa4s4iLQjy0jYDgheJ3+oll9+6Gf/p2IVlyTXQxnKKBmycKoWHxwYIqazRft5mSZk4G+TJj955wShc5fGREfJNc2FH8maN6NBcpvU5rWmiB5HSjA5hvZ5V+cOXAU0FuCrUKVxj0MFDp1k5/n+LTE/TR6De5sQ9+NmRAl2fBoBm6xy0idsik6BqHQSaefo4Oywu1LPiEKuiuRnoHwteiTSRhzq57xkvz/PQ3p7Y7L7knWEgn9dpNhmqXX/1f9vNSuxcxmhjK5AW6gJfRCETR2Qqqngr24VWLs4DsmUhNDx3yX88NwqJCYC+yHkXUS9mAns3XbER3vRuEYHh5VbNLLyBg5NNm2xqI+Ae7i5Qrjatnh/WQzJbeVNl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enant-Network-Message-Id: 23237929-fd0d-4fb8-defb-08d9a9a93f4f X-MS-Exchange-CrossTenant-AuthSource: PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2021 09:04:22.7497 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 80e41b3b-ea1f-4dbc-91eb-225a572951fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: B2AiG5Tq3O15nHGsorqIgSli3GJSgNv0RJ2uSaJgyjCDDuRSyW9VpRtXXeFjl7jfg0ssX5k039FyjLZCUCgYQ0e9MpDGMtldSgvJOWfVyLU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR10MB3849 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org When running the full test suite many tests can be skipped because of missing prerequisites. It not easy right now to get an overview of which ones are missing. When switching to a new machine or environment some libraries and tools might be missing or maybe a dependency broke completely. In this case the tests would indicate nothing since all dependant tests are simply skipped. This could hide broken behaviour or missing features in the build. Therefore this patch summarizes the missing prereqs at the end of the test run making it easier to spot such cases. - Add failed prereqs to the test results. - Aggregate and then show them with the totals. Signed-off-by: Fabian Stelzer --- t/aggregate-results.sh | 17 +++++++++++++++++ t/test-lib.sh | 11 +++++++++++ 2 files changed, 28 insertions(+) diff --git a/t/aggregate-results.sh b/t/aggregate-results.sh index 7913e206ed..ce217b4c0e 100755 --- a/t/aggregate-results.sh +++ b/t/aggregate-results.sh @@ -6,6 +6,7 @@ success=0 failed=0 broken=0 total=0 +missing_prereq= while read file do @@ -30,10 +31,26 @@ do broken=$(($broken + $value)) ;; total) total=$(($total + $value)) ;; + missing_prereq) + missing_prereq="$missing_prereq,$value" ;; esac done <"$file" done +if test -n "$missing_prereq" +then + unique_missing_prereq=$( + echo $missing_prereq | + tr -s "," "\012" | + grep -v '^$' | + sort -u | + paste -s -d ',') + if test -n $unique_missing_prereq + then + printf "\nmissing prereq: $unique_missing_prereq\n\n" + fi +fi + if test -n "$failed_tests" then printf "\nfailed test(s):$failed_tests\n\n" diff --git a/t/test-lib.sh b/t/test-lib.sh index 2679a7596a..f61da562f6 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -669,6 +669,8 @@ test_fixed=0 test_broken=0 test_success=0 +test_missing_prereq= + test_external_has_tap=0 die () { @@ -1069,6 +1071,14 @@ test_skip () { of_prereq=" of $test_prereq" fi skipped_reason="missing $missing_prereq${of_prereq}" + + # Keep a list of all the missing prereq for result aggregation + if test -z "$missing_prereq" + then + test_missing_prereq=$missing_prereq + else + test_missing_prereq="$test_missing_prereq,$missing_prereq" + fi fi case "$to_skip" in @@ -1175,6 +1185,7 @@ test_done () { fixed $test_fixed broken $test_broken failed $test_failure + missing_prereq $test_missing_prereq EOF fi From patchwork Wed Nov 17 09:04:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Stelzer X-Patchwork-Id: 12624017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 594AFC433EF for ; Wed, 17 Nov 2021 09:04:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C32261B54 for ; Wed, 17 Nov 2021 09:04:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234785AbhKQJHa (ORCPT ); Wed, 17 Nov 2021 04:07:30 -0500 Received: from mail-ve1eur01hn2212.outbound.protection.outlook.com ([52.100.7.212]:1921 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230064AbhKQJHY (ORCPT ); Wed, 17 Nov 2021 04:07:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f5MEZ+HQeZm45cod+2zFhZCn6VlRsRBwJK4VA6uPsoaI44kDxXrbI0iwU0fdDn0TCU0MZOJyFh2DrZqkOYyBJwKHM3rmte2vRuSd5xsxjfWco74php2j7kXGSi+bSDh0ipVyTE3w7VwBUdfB99xXnGdmuG8yYyBWoChYgjg0e1z7YXIhZEUY8OSurf0T5ZrSwE8P4KSlTnq0Pvv8hNfS6V4WhKPU3qzEdnHe49KOClDYkzUlUNp6gDgZqBuq1htUGatNWtG5JXv3eAeYvuJOCIg6Bfoph8KePQ9sRO95CttdZ7r+TM+dFEDR3baszwVDU8SS8/L8u4Js/dX1MckjVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CUJropcqEPF3Zq8STTSSrbFUc6Z0cajKISZOgGBZQX8=; b=dj659frPtXaJAYlxSDYMuO8J737leX2+LAohqR4lFPtZWX6MgBFwdy05j2OHEQlE4MW5zL2qJ3BaMPjAAlGR1x/imW2hod1Y1EtacvZMGxrVAvAAxjWFcvkF17fCa4ZXSLiT8ArKINhXVzvyn/mz4NPlLXdnzsVANbB0Sxhp2IUSe4bcdwKF+EKB/XIKEhWd1jrZC2Ulo9dqrYV81ueJOpFrly7AyQrXsArjzgUGZUDlAcbOvzxN74At5RBWPpBvpOobOsY05eaPqnInoklJBVa42EYab0EkqItN86zxGODpDgOKuz/t7m1A7OO/T4NbwKBKf0yQxf271B+hTKKHuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=gigacodes.de; dmarc=pass action=none header.from=gigacodes.de; dkim=pass header.d=gigacodes.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gigacodes.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CUJropcqEPF3Zq8STTSSrbFUc6Z0cajKISZOgGBZQX8=; b=ttNxJBvGo2RMrxVrsEWAQIpZl4m3qv/Mm7ghdg6zRPM5FbDTUa5CteWGR97maL0zmFGmO76g34xABJ22FX7A+qbU2z5WOtXvZozb20tKoBwaWAqkp5Sbo0hLu2wWpBQzImH5M/1SZ/0K3+ko10UAx5XF03U3UW/itdd31FL//eY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=gigacodes.de; Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) by PR3PR10MB3849.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:43::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.27; Wed, 17 Nov 2021 09:04:24 +0000 Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::f9d5:61ab:5756:b391]) by PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::f9d5:61ab:5756:b391%5]) with mapi id 15.20.4713.020; Wed, 17 Nov 2021 09:04:24 +0000 From: Fabian Stelzer To: git@vger.kernel.org Cc: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Adam Dinwoodie , Jeff King , Junio C Hamano , Fabian Stelzer Subject: [PATCH v2 2/2] test-lib: introduce required prereq for test runs Date: Wed, 17 Nov 2021 10:04:10 +0100 Message-Id: <20211117090410.8013-3-fs@gigacodes.de> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211117090410.8013-1-fs@gigacodes.de> References: <20211117090410.8013-1-fs@gigacodes.de> X-ClientProxiedBy: AS8P251CA0022.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::6) To PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) MIME-Version: 1.0 Received: from localhost (2003:ea:5820:600:c042:75a0:fd5e:1472) by AS8P251CA0022.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Wed, 17 Nov 2021 09:04:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27e1a72d-cb6a-4295-b777-08d9a9a93ff9 X-MS-TrafficTypeDiagnostic: PR3PR10MB3849: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HYdQwVwOuyZq96mYDysXOxHVTNTEP600Ffod6HpYitoyDXD2MzRikPaiICBodw9YDxm43QrwwiI9TPzhKNPdrXqPG3xOMSSBWfJ66c5ilXsb/Ct0++FZ5g/hNSgCTmmVh9HbNMFeu197kBCc0gsVKKI8wZE7K8yPs0lip+yf6wcwdDVt0PQz3KThJ07qZxfD29Xl2FVXWa5QkOJKkxjUaHTClmbLm3ruXCfFRBEdPtxZBstzwYqG8rs6agcVjy7kmKAFgMnJNlufuDujwRkP9BVGnNCjgffT/7eaen0pWj4EoGO9/H0yZyWX0/rRi1w3lNTXSzcQ9dplBicgfRd+5pBivrfcz4E8vsiMHEHbL2ftqXC+BqC+kMqVhpfK8c0CTtR9OgOC+aM1pHO+GtJBJtN4rjcf754agkVA6PPSXVol52EMtHGRjf+Z1LDYWmtHJAeKxOUMjwQKWs3wvdG0tQCi+WcoNKrMQfZoFuQIBFVOLYIyId01yql6QDY3QQM3WKrSouzGPBjPjulFoQ3ovQamkLwe5xTSRfRf251XR1kRKhsgh8JF5JPa/qSDpcor7fbovlgnx3qsnQq+GpNkqNyPHKzfUk0VmT+12dadJ5Da8iABwXFizZt+1jXYiDYHFMLt7IE7L5TaliL72bAAggTbFLrmBau7LKbal2HEOcLB5e0PmfQ4PKRFhfZeOOTB457j+v+u2D73nHo5LqeTIA6aYWA/gHSJ6ZWKbhGQ51RSclWTm+JMTOu7yq0Ox4A3qpvgIRl7q8pLwIkxWOxBSpRK/u6iifEHGlqKtgrKpbOFRcRgdn6d+qQeM28gp/oali4x5wowaHG5ExIacRF5oZXFMIhiZvG3u4oCjmwwBogSrB0Obb5ICjwyhcb1CNSKCBNPzSMfVdzsd8pits801dwuEBPsJRdrnUKos/zfHcj3eHwDCXnrbfXR5F2vx0iH3K4VyZo4Zk5NlAhm7JG1Z6y/3vJ5lnbEL5/LT/X1XIKwCC9JT0yBQ6k8TdaJc4n3DYso98gqMs52VzmoI0fyXw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:5;SRV:;IPV:NLI;SFV:SPM;H:PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:OSPM;SFS:(4636009)(366004)(39840400004)(136003)(396003)(346002)(376002)(66946007)(66476007)(66556008)(186003)(54906003)(38100700002)(107886003)(6666004)(508600001)(316002)(8676002)(8936002)(5660300002)(2616005)(36756003)(6916009)(6496006)(2906002)(86362001)(1076003)(52116002)(6486002)(83380400001)(4326008)(23200700001);DIR:OUT;SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zX/2xrvD7exnGcRgrawjXWYvylPssjQRSIZ6IU/u4yHpZ+Dzy41pw/buSq02AxDipuFzEfuoDXGi2LQ6e0AJJVLY2f44l+SxK4EFFbUS8h0TdDA86NbsNLuajj77NL4hpqcleJJv0m4VAYvfr5VkWZzUm69i5I+wq4HUfxozu8pT8v3AqSpIhUN7ArDfczhNz/rAo7tjGEudanQ+TtWoiiQycDrspNOXkLwb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AZBUMRcVU2V15HO9mDluAzjEXbQrXSQ8kIJeuQCfG3FW6CWo5cv85wixfNkknAY9MU8G7I61yjp66zx+tB+Q7VZXc4+vOdABfvB8T3tzcxGylq6PfQIcmN0jOJGr/Cb6hrM8YLgVX4YFsn6/xJyCdl4wisMb2SxvgVd5oyzE5dswD+UfAq+3Oq9kkIEd6voH+iRzXhy1/7tKn0DsXhvcrUaKwArUKehC+Z7oBqCdvqtHWunXO17H+drHhjpB/011/xhcwQB43e1g7yPoIZXdTo/HI9PGdFdt2n2GWcbvkjpni1pJy81mc9DTdf7V1PZa7ohqM3tpraco8Rlg3jsapH0DdRZiCWKRyTAKOD/qOK0s/wqeHrICSjJptFlxXYXcLb28c5Ef1ugWMVlSQJNjRgM9FxwvDSro1S+jkjruWbxHn0XCnZes+N//LS0OF42or+f+M8ObSsg0+oLLFOI= X-OriginatorOrg: gigacodes.de X-MS-Exchange-CrossTenant-Network-Message-Id: 27e1a72d-cb6a-4295-b777-08d9a9a93ff9 X-MS-Exchange-CrossTenant-AuthSource: PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2021 09:04:23.9265 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 80e41b3b-ea1f-4dbc-91eb-225a572951fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OK1O72/dJCdKSOT61NsRkq0XrWimpmfwpOooUUroryxh/z/NaYNoGJ6J/YLo/Qqc+ym0sIAUhyc+JetzC7+/SYQKATHGwcAlO0NBWurs60Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR10MB3849 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In certain environments or for specific test scenarios we might expect a specific prerequisite check to succeed. Therefore we would like to trigger an error when running our tests if this is not the case. To remedy this we add the environment variable GIT_TEST_REQUIRE_PREREQ which can be set to a comma separated list of prereqs. If one of these prereq tests fail then the whole test run will abort. Signed-off-by: Fabian Stelzer --- t/README | 6 ++++++ t/test-lib-functions.sh | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/t/README b/t/README index 29f72354bf..18ce75976e 100644 --- a/t/README +++ b/t/README @@ -466,6 +466,12 @@ explicitly providing repositories when accessing submodule objects is complete or needs to be abandoned for whatever reason (in which case the migrated codepaths still retain their performance benefits). +GIT_TEST_REQUIRE_PREREQ= allows specifying a comma speparated list of +prereqs that are required to succeed. If a prereq in this list is triggered by +a test and then fails then the whole test run will abort. This can help to make +sure the expected tests are executed and not silently skipped when their +dependency breaks or is simply not present in a new environment. + Naming Tests ------------ diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index eef2262a36..2c8abf3420 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -680,6 +680,17 @@ test_have_prereq () { # Keep a list of missing prerequisites; restore # the negative marker if necessary. prerequisite=${negative_prereq:+!}$prerequisite + + # Abort if this prereq was marked as required + if test -n $GIT_TEST_REQUIRE_PREREQ + then + case ",$GIT_TEST_REQUIRE_PREREQ," in + *,$prerequisite,*) + error "required prereq $prerequisite failed" + ;; + esac + fi + if test -z "$missing_prereq" then missing_prereq=$prerequisite