All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] test-lib: guard against being run as 'prove t*.sh'
Date: Thu, 11 Mar 2021 09:33:53 -0800	[thread overview]
Message-ID: <xmqqwnudegse.fsf@gitster.g> (raw)
In-Reply-To: <20210311124216.25036-1-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Thu, 11 Mar 2021 13:42:16 +0100")

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> We have t/Makefile targets to properly run the tests with prove,
> however it's also just as valid to run them as e.g.:
>
>     prove t[0-9]*.sh
>
> But if they're run as:
>
>     prove t*.sh

I am not sure if the above is a good enough excuse to diverge from
our convention not to add #! to signal that a scriptlet is not to
be used standalone but is meant to be dot-sourced.  At least to me,
this change looks like making the codebase worse to protect from a
mistake that we should not have to worry about in real life.

But that may be because my use of prove is limited to a more
targetted and narrow set of tests (i.e. either use "t4???-*.sh" for
an area, or a single test---anything broader I'd use "make").

      reply	other threads:[~2021-03-11 17:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 12:42 [PATCH] test-lib: guard against being run as 'prove t*.sh' Ævar Arnfjörð Bjarmason
2021-03-11 17:33 ` Junio C Hamano [this message]

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=xmqqwnudegse.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.