git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin Ågren" <martin.agren@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH] t: avoid sed-based chain-linting in some expensive cases
Date: Thu, 13 May 2021 13:05:28 +0200	[thread overview]
Message-ID: <CAN0heSp3mXQeqeC_Zd==bBoJCCWe-NzJsomuUf6MTxy7+WZ1wA@mail.gmail.com> (raw)
In-Reply-To: <YJzGcZpZ+E9R0gYd@coredump.intra.peff.net>

On Thu, 13 May 2021 at 08:29, Jeff King <peff@peff.net> wrote:
> This patch introduces a mechanism for controlling when those extra
> lint checks are run, at two levels:
>
>   - a user can ask to disable or to force-enable the checks by setting
>     GIT_TEST_CHAIN_LINT_HARDER
>
>   - if the user hasn't specified a preference, individual scripts can
>     disable the checks by setting GIT_TEST_CHAIN_LINT_HARDER_DEFAULT;
>     scripts which don't set that get the current behavior of enabling
>     them.

> +# Disable expensive chain-lint tests; all of the tests in this script
> +# are variants of a few trivial test-tool invocations, and there are a lot of
> +# them.
> +GIT_TEST_CHAIN_LINT_HARDER_DEFAULT=0

Devil's advocate: Who do we expect to turn GIT_TEST_CHAIN_LINT_HARDER
on, and when?  If no one ever does it then we might as well drop the
"default" thing and just go "we won't bother linting these particular
tests, ever". But as long as "someone" does it "sometimes", it's not
like it's a very complex mechanism to carry around.

I seem to have 140 tests that haven't changed on disk since I did this
particular clone in 2017. 235 haven't changed this calendar year. Maybe
we could skip linting those tests that haven't been modified for several
weeks on the basis that they can't reasonably have newly-introduced
syntax mistakes. I guess it gets tricky where the t????-*.sh file
doesn't change in a long time, but it sources tests from other places,
such as a lib-foo.sh helper. We'd have to be a bit more clever there.
That's all just thinking out loud, and definitely not something that
should hold up your patch.


Martin

  parent reply	other threads:[~2021-05-13 11:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13  6:25 Jeff King
2021-05-13  6:49 ` Junio C Hamano
2021-05-13  7:23   ` Jeff King
2021-05-13 11:05 ` Martin Ågren [this message]
2021-05-14  5:48   ` Jeff King
2021-05-14  8:52     ` Martin Ågren
2021-05-15  9:19       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN0heSp3mXQeqeC_Zd==bBoJCCWe-NzJsomuUf6MTxy7+WZ1wA@mail.gmail.com' \
    --to=martin.agren@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.com \
    --subject='Re: [PATCH] t: avoid sed-based chain-linting in some expensive cases' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).