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