Subject: Re: [PATCH v2 1/3] test-lib: allow selecting tests by substring/regex with --run

From: Junio C Hamano <[email-masked]>
Date: Fri, 16 Oct 2020 09:30:21 -0700

Junio C Hamano <[email-masked]> writes:

> Jeff King <[email-masked]> writes:
>
>> My plan is that you'd be able to say:
>>
>>   Meta/make --test=filesystem,update-ref
>>
>> for t0050 and t1400 respectively. Or more interesting things like
>> "git-svn-*" to skip all of the t91xx tests (or "git-svn/*" if we split
>> them by directories).
> ...
> The word "filesystem"?  Unless we have a rule that we can use each
> unique word in test names only once (which of course is impractical)
> I am not sure I can use it in place of 0050 without checking names
> of other tests first.
>
>> I definitely don't want to make anybody's life harder. But if the
>> numbers aren't unique and the text connected to them is, then it seems
>> like we should just use the text primarily.
>
> True in principle, but it is harder to come up with unique substring
> of text, knowing only that the whole string is unique.

I think there was a mismatch in assumptions and expectations.  I
think your "plan" was to use the whole name (what comes after \d+-
in the current naming scheme, except for the .sh at the end), and I
was assuming a glob with implicit * on both ends would be used, i.e.

    $ ls -d t/*update-ref*

would give me 1404 (update-ref-errors) in addition to 1400 (update-ref).

So if the rule is to always spell out the full name if I wanted
uniqueness, then it would work.  In the cited usecase of knowing
which two failed the first time, I should have the full filename
of them available.

Thanks.