From patchwork Fri Oct 16 19:28:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 11842307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC243C433E7 for ; Fri, 16 Oct 2020 19:28:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CD6F20EDD for ; Fri, 16 Oct 2020 19:28:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tTc8QShb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411025AbgJPT25 (ORCPT ); Fri, 16 Oct 2020 15:28:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408086AbgJPT25 (ORCPT ); Fri, 16 Oct 2020 15:28:57 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1010C0613D3 for ; Fri, 16 Oct 2020 12:28:56 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 13so3476418wmf.0 for ; Fri, 16 Oct 2020 12:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=MqxKsI6OmBnKwnIq+QoHam6lJvQkykRlVtL274DUJgg=; b=tTc8QShbb/FqLBJ1kZF/3TXLBM6cictFswpB1p9WeNzjunc+vBcgqVHDe6BmkvjOa+ dAxYxpvSkUKuXDR6a4Bs2iGKOZaEC05xNAS5gri/XoOxKts7svgR5t0mGyIlRErmnIsy OOxoRefmU4dTFXDiyFR4aBR/1kci1W8UWUU5MgbV4tOgGAJou4VB1Q/EZ+U7SOf7Ftek Btc+ZNtG7w5YZjq+ujA64RHnPdOO9IWuWgxYxnlCWCJSb+6mucKk7E5aNNeOwklEMI0K ga9n6K8QQV2kuWsB6hnrTZ4uJvWq8+9AaNHOZJ5faAo585oJk9k5s/iu3meG81QgWkpx 50mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=MqxKsI6OmBnKwnIq+QoHam6lJvQkykRlVtL274DUJgg=; b=FaBmAetGZ1wmpJ4pSE7N9lDtJhQyn3E+jztUCtYHNcmUS+/mFkCZW+IaFOtHFsqARE oYclBTBRrWuvaKoF+CyJcro0udaRuVN2cdxCppKB+jpmr+AQjQrMhFjK61zjDA+pkUvr mSJbPg/iuFzxxGmDUNloilVZjTFVsODOyco4uArPLF/18ruqKQG6mFGomumnfHxtcFlb DESaB/smK5rX69kek7u79xmxS9ctfZnBOxW+81kv1itGvNeY8RnlnGFGmMWPP3Bne+x8 2dEItDxd2Hy+6TBD1DBeex+n1Nx3BeYmmqXRDRDq28Cc2xUBFtZVTtWCR0FBGDaa700R Ueyw== X-Gm-Message-State: AOAM530GDUkvOkwUtb6ybZrY69kpDDw4IgPUA3oFl8Nmd9jnnOz4e5mh xTZZxFUEi83jYCDHl4Dfft1jObDGeSk= X-Google-Smtp-Source: ABdhPJw4Ft/CAtZYyD99JgQfVpE7lVKb0PY2K4Ad6Qx48YTdpaKZqTj6Etfwv40AhWmnztdJQzDIfg== X-Received: by 2002:a7b:cf04:: with SMTP id l4mr5644288wmg.137.1602876534374; Fri, 16 Oct 2020 12:28:54 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id h3sm5045656wrq.0.2020.10.16.12.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 12:28:53 -0700 (PDT) Message-Id: <8f5d4ad31804e456d134a09f11d82aed14f7141d.1602876532.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Fri, 16 Oct 2020 19:28:50 +0000 Subject: [PATCH v4 1/3] test-lib: allow selecting tests by substring/glob with --run Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Phillip Wood , Taylor Blau , Elijah Newren , Jeff King , Junio C Hamano , Johannes Schindelin , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren Many of our test scripts have several "setup" tests. It's a lot easier to say ./t0050-filesystem.sh --run=setup,9 in order to run all the setup tests as well as test #9, than it is to track down what all the setup tests are and enter all their numbers in the list. Also, I often find myself wanting to run just one or a couple tests from the test file, but I don't know the numbering of any of the tests -- to get it I either have to first run the whole test file (or start counting by hand or figure out some other clever but non-obvious tricks). It's really convenient to be able to just look at the test description(s) and then run ./t6416-recursive-corner-cases.sh --run=symlink or ./t6402-merge-rename.sh --run='setup,unnecessary update' Add such an ability to test selection which relies on merely matching against the test description. Signed-off-by: Elijah Newren --- t/README | 37 +++++++++++++++++++++++++++---------- t/t0000-basic.sh | 41 +++++++++++++++++++++++++---------------- t/test-lib.sh | 16 ++++++++++------ 3 files changed, 62 insertions(+), 32 deletions(-) diff --git a/t/README b/t/README index 2adaf7c2d2..4594f3ab7b 100644 --- a/t/README +++ b/t/README @@ -258,16 +258,21 @@ For an individual test suite --run could be used to specify that only some tests should be run or that some tests should be excluded from a run. -The argument for --run is a list of individual test numbers or -ranges with an optional negation prefix that define what tests in -a test suite to include in the run. A range is two numbers -separated with a dash and matches a range of tests with both ends -been included. You may omit the first or the second number to -mean "from the first test" or "up to the very last test" -respectively. - -Optional prefix of '!' means that the test or a range of tests -should be excluded from the run. +The argument for --run, , is a list of description +substrings or globs or individual test numbers or ranges with an +optional negation prefix (of '!') that define what tests in a test +suite to include (or exclude, if negated) in the run. A range is two +numbers separated with a dash and matches a range of tests with both +ends been included. You may omit the first or the second number to +mean "from the first test" or "up to the very last test" respectively. + +The argument to --run is split on commas and whitespace into separate +strings, numbers, and ranges, and picks all tests that match any of +the individual selection criteria. If the substring of the +description text that you want to match includes a comma or space, use +the glob character '?' instead. For example --run='unnecessary?update +timing' would match on all tests that match either the glob +*unnecessary?update* or the glob *timing*. If --run starts with an unprefixed number or range the initial set of tests to run is empty. If the first item starts with '!' @@ -317,6 +322,18 @@ test in the test suite except from 7 up to 11: $ sh ./t9200-git-cvsexport-commit.sh --run='!7-11' +Sometimes there may be multiple tests with e.g. "setup" in their name +that are needed and rather than figuring out the number for all of them +we can just use "setup" as a substring/glob to match against the test +description: + + $ sh ./t0050-filesystem.sh --run=setup,9-11 + +or one could select both the setup tests and the rename ones (assuming all +relevant tests had those words in their descriptions): + + $ sh ./t0050-filesystem.sh --run=setup,rename + Some tests in a test suite rely on the previous tests performing certain actions, specifically some tests are designated as "setup" test, so you cannot _arbitrarily_ disable one test and diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh index 923281af93..07105b2078 100755 --- a/t/t0000-basic.sh +++ b/t/t0000-basic.sh @@ -705,7 +705,31 @@ test_expect_success '--run empty selectors' " EOF " -test_expect_success '--run invalid range start' " +test_expect_success '--run substring selector' " + run_sub_test_lib_test run-substring-selector \ + '--run empty selectors' \ + --run='relevant' <<-\\EOF && + test_expect_success \"relevant test\" 'true' + for i in 1 2 3 4 5 6 + do + test_expect_success \"other test #\$i\" 'true' + done + test_done + EOF + check_sub_test_lib_test run-substring-selector <<-\\EOF + > ok 1 - relevant test + > ok 2 # skip other test #1 (--run) + > ok 3 # skip other test #2 (--run) + > ok 4 # skip other test #3 (--run) + > ok 5 # skip other test #4 (--run) + > ok 6 # skip other test #5 (--run) + > ok 7 # skip other test #6 (--run) + > # passed all 7 test(s) + > 1..7 + EOF +" + +test_expect_success '--run keyword selection' " run_sub_test_lib_test_err run-inv-range-start \ '--run invalid range start' \ --run='a-5' <<-\\EOF && @@ -735,21 +759,6 @@ test_expect_success '--run invalid range end' " EOF_ERR " -test_expect_success '--run invalid selector' " - run_sub_test_lib_test_err run-inv-selector \ - '--run invalid selector' \ - --run='1?' <<-\\EOF && - test_expect_success \"passing test #1\" 'true' - test_done - EOF - check_sub_test_lib_test_err run-inv-selector \ - <<-\\EOF_OUT 3<<-\\EOF_ERR - > FATAL: Unexpected exit with code 1 - EOF_OUT - > error: --run: invalid non-numeric in test selector: '1?' - EOF_ERR -" - test_set_prereq HAVEIT haveit=no diff --git a/t/test-lib.sh b/t/test-lib.sh index ef31f40037..a040d54a76 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -769,6 +769,8 @@ match_pattern_list () { } match_test_selector_list () { + operation="$1" + shift title="$1" shift arg="$1" @@ -805,13 +807,13 @@ match_test_selector_list () { *-*) if expr "z${selector%%-*}" : "z[0-9]*[^0-9]" >/dev/null then - echo "error: $title: invalid non-numeric in range" \ + echo "error: $operation: invalid non-numeric in range" \ "start: '$orig_selector'" >&2 exit 1 fi if expr "z${selector#*-}" : "z[0-9]*[^0-9]" >/dev/null then - echo "error: $title: invalid non-numeric in range" \ + echo "error: $operation: invalid non-numeric in range" \ "end: '$orig_selector'" >&2 exit 1 fi @@ -819,9 +821,11 @@ match_test_selector_list () { *) if expr "z$selector" : "z[0-9]*[^0-9]" >/dev/null then - echo "error: $title: invalid non-numeric in test" \ - "selector: '$orig_selector'" >&2 - exit 1 + case "$title" in *${selector}*) + include=$positive + ;; + esac + continue fi esac @@ -1031,7 +1035,7 @@ test_skip () { skipped_reason="GIT_SKIP_TESTS" fi if test -z "$to_skip" && test -n "$run_list" && - ! match_test_selector_list '--run' $test_count "$run_list" + ! match_test_selector_list '--run' "$1" $test_count "$run_list" then to_skip=t skipped_reason="--run" From patchwork Fri Oct 16 19:28:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 11842311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33834C433E7 for ; Fri, 16 Oct 2020 19:29:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BCD3420EDD for ; Fri, 16 Oct 2020 19:29:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eBtKRdKM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393122AbgJPT3F (ORCPT ); Fri, 16 Oct 2020 15:29:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408086AbgJPT3C (ORCPT ); Fri, 16 Oct 2020 15:29:02 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DE4DC061755 for ; Fri, 16 Oct 2020 12:29:02 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id i1so4259444wro.1 for ; Fri, 16 Oct 2020 12:29:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=CzrCPnbUvNSakWF2bvkdGZ4dwzkAgsYCMdLnhb7Mw8c=; b=eBtKRdKMYGn/qCuXP0RQG0m+Who+9XbZ37zYP1QRijQde2l++KYrbcqbch2RPe4W3E ew2stUdOLlL5iU1uQiU5kelfuMqJlWmn3wMOrvT7rXmbZ2tuz39Hp/HHnDiV4wNqU4n7 ATqoqh7trlTZwkX+5mnaReq9UMhpFOs6lGIeVa8QO/CxV28W1AJCimwNjSr2bd6JfFeJ voQfAwDvNk4dP6GyEhPu5NOxMJ9PRBdfRxqFhcXaZ9JcpUjhhDU8TV0t5BfRQvyQPuaJ rfyilCjCTTXLhiCu1kUOT22t6eaChpuj+uKpNJh3MOxP+Vna38OKXw5gTl+j2x/p4YFL GzoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=CzrCPnbUvNSakWF2bvkdGZ4dwzkAgsYCMdLnhb7Mw8c=; b=pJuznAm4TypBZVWGZ+bLMVwHg+PgVakf1vSvcszv0We5glr2yi+NIA8IfSFka1AwF4 3R4+XTVEH/8row23ldYR/UMk/ze1OtsCBAIpx691l7cQ2C37vKRG8uFSZ3jDENsqSlWM tug3QSSGBHtsjLAjF2kJ6azcbHfnLTXV8iAezSJWnxMBjIxak/jmzWoPH6zuYS/lJaIv PtX6byEbbT7aaWnehxXNKDpV2VB/amD+5onnoxRFYG2QkiTTLtHpSHUUszS95KzTxLfg 28/Uyfv1lWjuS5QJ3rkE/UJOtw6MM8/lnQCukEhVMhCPJY12eZ4pZtDsw99CmZsnAcLM IcLQ== X-Gm-Message-State: AOAM532SlsE3i344KZ96ucTZf9SksL+WYjmzK9U26KOLcKysM8vz6WQV FrV24fwJ4zJpJPNl0EIG8+T6A2+pIKk= X-Google-Smtp-Source: ABdhPJyB/6WtTOoRHPaEPbocjaDIHJQ3PMyIQcj++VdMVOr0R3VoteV7jZr4Tx7pF7Bey0gdk9Yk2A== X-Received: by 2002:adf:a31c:: with SMTP id c28mr6004995wrb.351.1602876536756; Fri, 16 Oct 2020 12:28:56 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id d20sm4998662wra.38.2020.10.16.12.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 12:28:54 -0700 (PDT) Message-Id: In-Reply-To: References: Date: Fri, 16 Oct 2020 19:28:51 +0000 Subject: [PATCH v4 2/3] t6006, t6012: adjust tests to use 'setup' instead of synonyms Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Phillip Wood , Taylor Blau , Elijah Newren , Jeff King , Junio C Hamano , Johannes Schindelin , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren With the new ability to pass --run=setup to select which tests to run, it is more convenient if tests use the term "setup" instead of synonyms like 'prepare' or 'rebuild'. There are undoubtedly many other tests in our testsuite that could be changed over too, these are just a couple that I ran into. Signed-off-by: Elijah Newren --- t/t6006-rev-list-format.sh | 2 +- t/t6012-rev-list-simplify.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh index bc95da8a5f..99a1eaf332 100755 --- a/t/t6006-rev-list-format.sh +++ b/t/t6006-rev-list-format.sh @@ -339,7 +339,7 @@ commit $head1 .. (hinzugef${added_utf8_part_iso88591}gt) foo EOF -test_expect_success 'prepare expected messages (for test %b)' ' +test_expect_success 'setup expected messages (for test %b)' ' cat <<-EOF >expected.utf-8 && commit $head3 This commit message is much longer than the others, diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh index b6fa43ace0..7254060240 100755 --- a/t/t6012-rev-list-simplify.sh +++ b/t/t6012-rev-list-simplify.sh @@ -168,7 +168,7 @@ test_expect_success '--full-diff is not affected by --parents' ' # # This example is explained in Documentation/rev-list-options.txt -test_expect_success 'rebuild repo' ' +test_expect_success 'setup rebuild repo' ' rm -rf .git * && git init && git switch -c main && From patchwork Fri Oct 16 19:28:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 11842309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DD5BC43457 for ; Fri, 16 Oct 2020 19:29:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EE8720EDD for ; Fri, 16 Oct 2020 19:29:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CVxosDJC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411031AbgJPT3B (ORCPT ); Fri, 16 Oct 2020 15:29:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408086AbgJPT27 (ORCPT ); Fri, 16 Oct 2020 15:28:59 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0A62C061755 for ; Fri, 16 Oct 2020 12:28:59 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id e17so4188711wru.12 for ; Fri, 16 Oct 2020 12:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=ow+/NiC5LPtUcWqbRrL35jbgCSi7RxYdbnk1PlDpvqU=; b=CVxosDJCVD2J7ojF/ty9eRgt0nNjSF72vIFP0EAnO4OmgPay9FGEWBIThyQ3gKx+9A /ToTn0g769R+AUhChNQBVX3P5/99ZxRvLKYuavbgMEAF8BipLo+Ho19XTMziXUjwCGji MEAvUUO9bG6h0jP+OZW2DhXvSggfGTgsOjdy56ZarEsvoyRMKR+iz3FKnNr7rYojiqNN BP8hesDbKfrGxzeaWQaLyC04Of9Pc6KsGA8yk7gvOzMlORJiSw39iu+n7ih3rvQf8ctv u4NjIW9dJo3sOrm8WK/l/yY0F9Pc6xUELHS7ev6v6+rWUVZtyIabQe/nzsZB5v+PIxSy E7vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=ow+/NiC5LPtUcWqbRrL35jbgCSi7RxYdbnk1PlDpvqU=; b=G0GpMYXlC3iopEkVX6iR14PV54N/X3A/r6W/zFKDM3o6NdUZgIkk6jq6Y1pE+yVUI4 sjDuo8h4/g2YcEdeB4G6MXLG3ccs72unR6htopTX0dsQ1inyYQCx/y9V7PsdJCGSmNWg IQOs9EaRGBrywEWX85uJNWri1HwacBb3DjiL6tzV4BDa7tRVqzl9Kr/B75AOrJRIavmb 0IHQ5bxQ76nlDdVSo+s96Kj0dbYqevuJRgbmx1tsxJNWIvC/PPaSDB6EQsS0BHXLaBGD ygcmTGMXn8uQsvAtXlAxvMwzDXdwBM0YJi1wq/ytGxZQJR0TVOtPrsMbXwCmyZ+BEmS5 KiQw== X-Gm-Message-State: AOAM533Ix0x+9cdGbu0AhsawiXSW/FTh80BSXamMeH22CwUyaFWGa9Lb Wk+Ec4hFURo5aesUO/vaIk7n3UeTqns= X-Google-Smtp-Source: ABdhPJyoF9B3N7UmyuL0ZZe9+vtsShbgjwWDjsHqr+T9SHC0QTt/UlCLRhaRD1XLTjC7d9pmT4/G2g== X-Received: by 2002:adf:fa01:: with SMTP id m1mr6051048wrr.220.1602876538255; Fri, 16 Oct 2020 12:28:58 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id v9sm3650199wmh.23.2020.10.16.12.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 12:28:57 -0700 (PDT) Message-Id: <0e1a1125f7ffc4d97e470474c2c3ee05a25efdeb.1602876532.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Fri, 16 Oct 2020 19:28:52 +0000 Subject: [PATCH v4 3/3] test-lib: reduce verbosity of skipped tests Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Phillip Wood , Taylor Blau , Elijah Newren , Jeff King , Junio C Hamano , Johannes Schindelin , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren 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 (in addition to the TAP output line) 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 to remove this extra output, leaving only the TAP output line (i.e. the line reading "ok # skip ", which already mentions that the test was "skip"ped). Signed-off-by: Elijah Newren --- t/test-lib.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index a040d54a76..3f8c404335 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1062,7 +1062,6 @@ test_skip () { " " fi - say_color skip >&3 "skipping test: $@" say_color skip "ok $test_count # skip $1 ($skipped_reason)" : true ;;