From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 5EB891F4B4 for ; Tue, 13 Oct 2020 17:57:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727314AbgJMR5G (ORCPT ); Tue, 13 Oct 2020 13:57:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727190AbgJMR5G (ORCPT ); Tue, 13 Oct 2020 13:57:06 -0400 Received: from mail-oo1-xc43.google.com (mail-oo1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26EC7C0613D0 for ; Tue, 13 Oct 2020 10:57:06 -0700 (PDT) Received: by mail-oo1-xc43.google.com with SMTP id y127so98313ooa.5 for ; Tue, 13 Oct 2020 10:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aGJPjBRUr8YmS3Z932EuFPp3auCvB90lO5ZdqSmQU2M=; b=VK4cvlj5msWdilJQkJUINxMCsbpE/AWYh4PDXe3Hnq+JO44nm6wdXyaVWWamG0kqLF ynL7Wxs+/AGhU7PS6I3EetbtAsEE47EmBmFW27HvDboD7kQIhRqr1KURjbXnuV8TnTvB 7iWS0fNLvPQ1N9LeR//ruoy5haJDLF38HYsNjcz7zWSkKdkrKuCuakdlLOLmrd69oB1r sKdmD3sunKxtiNFn1L3omuxHjumODVtf9yekg1PK6oWxBJWdeuEMr98/wJw0HW66ijRK ckWGqPQeF8ZI8QKGSZEp7OY08gU/gByFi+YaDEsq/CpvsmNitVuEllbKigRLUnQ2lQAT kKEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aGJPjBRUr8YmS3Z932EuFPp3auCvB90lO5ZdqSmQU2M=; b=ukhE+xu/pEi1F6ItdbIuVuPjZFIP1/VgAsmvGyHsxWZl7k5J8rOiIotFNVhBqHkrUJ J3jEr5nuMQb9AdSGO9Iuhvnc35ijJqdvCKYsJnURg1F1abWtCNLd8kd26lKtdGb4FFpG vtCobTmfkKTrcuMqlauacaaL/RiwZ25YuCNi9bPqc0Y14GoCQfEjiG/0IEgCQLaDxZ0i a0yMr8AVmBql3C6wc2pUVFXUnobUzAKv/cX2azz8ntUTDXw513WsL5HCiaU7Lli+Ffvj ekv82ioI1vXEVFRp4e4E18mDYDJCMde0KE10PVgR2vPPHqbjSutSKd+rLwqiE4xUgo8f apsw== X-Gm-Message-State: AOAM532Z1/tTP/DKdnzb15ZmWti9z73LxowvKx5bHDAJYBcida1f7x6s tXSt6XLZhjhYc51v7Amdrr1myBr0XSgIiiW4c/SdKx+dXOb6PA== X-Google-Smtp-Source: ABdhPJwRLwCI2u5Ms/nrd8yf94QzICD1LenMgXC5TaQaIuuywVC43R7CWUCXjodknQEc+aru69rkIHM7QGC1MYY88Y0= X-Received: by 2002:a4a:b443:: with SMTP id h3mr413599ooo.45.1602611825293; Tue, 13 Oct 2020 10:57:05 -0700 (PDT) MIME-Version: 1.0 References: <20201013154439.GB1913367@nand.local> In-Reply-To: <20201013154439.GB1913367@nand.local> From: Elijah Newren Date: Tue, 13 Oct 2020 10:56:54 -0700 Message-ID: Subject: Re: [PATCH 3/3] test-lib: reduce verbosity of skipped tests To: Taylor Blau Cc: Elijah Newren via GitGitGadget , Git Mailing List , Junio C Hamano Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Oct 13, 2020 at 8:44 AM Taylor Blau wrote: > > On Mon, Oct 12, 2020 at 11:26:04PM +0000, Elijah Newren via GitGitGadget wrote: > > From: Elijah Newren > > > > When using the --run flag to run just two or three tests from a test > > file which contains several dozen tests, having every skipped test print > > out dozens of lines of output for the test code for that skipped test > > adds up to hundreds or thousands of lines of irrelevant output that make > > it very hard to fish out the relevant results you were looking for. > > Simplify the output for skipped tests down to just showing the one-line > > descriptions. > > > > Signed-off-by: Elijah Newren > > --- > > 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 2aca398e1e..7602bbe9e9 100644 > > --- a/t/test-lib.sh > > +++ b/t/test-lib.sh > > @@ -1059,7 +1059,7 @@ test_skip () { > > " " > > fi > > > > - say_color skip >&3 "skipping test: $@" > > + say_color skip >&3 "skipping test: $1" > > I would be comfortable going further than this and removing this line > entirely. We need the "ok $test_count # skip" below since it's part of > our TAP output, but now the output looks somewhat redundant. > > With this patch running a test that I'm working on with `--run=...`, I > get output that looks like: > > skipping test: writing bitmaps via command-line can duplicate .keep objects > ok 2 # skip writing bitmaps via command-line can duplicate .keep objects (--run) > > skipping test: writing bitmaps via config can duplicate .keep objects > ok 3 # skip writing bitmaps via config can duplicate .keep objects (--run) > > Scanning over the same test description twice per skipped test makes the > output difficult (but still much easier than before) to scan. What do > you think about either of the following: > > skipping test: writing bitmaps via command-line can duplicate .keep objects > ok 2 # skip (--run) > > or: > > ok 2 # skip writing bitmaps via command-line can duplicate .keep objects (--run) > > I have a slight preference towards the latter, since it keeps more of > the information in the TAP line, and it cuts the total line count of > output from skipped tests in half. > > For what it's worth, I'd also be fine with the patch as-is. I was worried that shortening it as much as I did would run into objections for some obscure reason. But if no one objects, I think I'd also prefer your latter suggestion for shortening it even more. It looks like the dual output for skipped tests comes from commit 04ece59399 ("GIT_SKIP_TESTS: allow users to omit tests that are known to break", 2006-12-28) by Junio, so it'd be nice to hear his opinion on how much we shorten it.