From: Ilya Bobyr <ilya.bobir@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
Eric Sunshine <sunshine@sunshineco.com>
Cc: Ilya Bobyr <ilya.bobyr@gmail.com>, Git List <git@vger.kernel.org>,
Jonathan Nieder <jrnieder@gmail.com>,
Thomas Rast <tr@thomasrast.ch>
Subject: Re: [PATCH 2/2] test-lib: GIT_TEST_ONLY to run only specific tests
Date: Mon, 03 Mar 2014 15:48:41 -0800 [thread overview]
Message-ID: <531514D9.4000101@gmail.com> (raw)
In-Reply-To: <xmqqob1mn9t6.fsf@gitster.dls.corp.google.com>
On 3/3/2014 3:26 PM, Junio C Hamano wrote:
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
>> On Mon, Mar 3, 2014 at 5:24 AM, Ilya Bobyr <ilya.bobyr@gmail.com> wrote:
>>> This is a counterpart to GIT_SKIP_TESTS. Mostly useful when debugging.
>> To be grammatically similar to GIT_SKIP_TESTS, perhaps name it GIT_RUN_TESTS?
> I actually do not like the interface to use two variables very much.
> Can't we just allow negative entries on "to be skipped" list?
>
> That is
>
> GIT_SKIP_TESTS='t9??? !t91??'
>
> would skip nine-thousand series, but would run 91xx series, and all
> the others are not excluded.
>
> Simple rules to consider:
>
> - If the list consists of _only_ negated patterns, pretend that
> there is "unless otherwise specified with negatives, skip all
> tests", i.e. treat GIT_SKIP_TESTS='!t91??' just the same way you
> would treat GIT_SKIP_TESTS='* !t91??'.
>
> - The orders should not matter for simplicity of the semantics;
> before running each test, check if it matches any negative (and
> run it if it matches, without looking at any positives), and
> otherwise check if it matches any positive (and skip it if it
> does not).
>
> Hmm?
I can do that. But I am not sure that matches the use cases I had in
mind the best.
First use case is that while developing I want to run tests frequently
and I have a specific test that I am working on at the moment.
That test is broken and I am trying to fix it (TDD).
I want to run just the initialization test(s) and then that specific test.
Running everything is quite slow.
GIT_RUN_ONLY addresses the TDD case.
Second case is when I broke one or more tests and want to figure out
what is wrong.
In this case running tests after the broken one will clutter the output
directory and will make debugging somewhat harder, especially if I am
not familiar with all the tests.
For the second case I was actually thinking that something like
"<t9100.32" would be useful, where 32 is the broken test.
Maybe we can come up with an interface that covers all 3 cases?
While exclusion can be used it adds an extra step to both cases, as you
need to mentally negate what you want first.
It might be that we are looking at different use cases, as you are
talking about whole test suits.
next prev parent reply other threads:[~2014-03-03 23:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-03 10:24 [PATCH 1/2] test-lib: tests skipped by GIT_SKIP_TESTS say so Ilya Bobyr
2014-03-03 10:24 ` [PATCH 2/2] test-lib: GIT_TEST_ONLY to run only specific tests Ilya Bobyr
2014-03-03 15:56 ` Philip Oakley
2014-03-03 23:03 ` Eric Sunshine
2014-03-03 23:16 ` Ilya Bobyr
2014-03-03 23:26 ` Junio C Hamano
2014-03-03 23:48 ` Ilya Bobyr [this message]
2014-03-04 0:08 ` Junio C Hamano
2014-03-04 7:06 ` Ilya Bobyr
2014-03-04 8:29 ` Junio C Hamano
2014-03-04 9:18 ` Ilya Bobyr
2014-03-04 19:01 ` Junio C Hamano
2014-03-03 15:11 ` [PATCH 1/2] test-lib: tests skipped by GIT_SKIP_TESTS say so Philip Oakley
2014-03-03 23:08 ` Ilya Bobyr
2014-03-03 22:59 ` Eric Sunshine
2014-03-03 23:12 ` Ilya Bobyr
2014-03-03 23:13 ` Junio C Hamano
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=531514D9.4000101@gmail.com \
--to=ilya.bobir@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ilya.bobyr@gmail.com \
--cc=jrnieder@gmail.com \
--cc=sunshine@sunshineco.com \
--cc=tr@thomasrast.ch \
/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 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).