From: Junio C Hamano <gitster@pobox.com>
To: Ilya Bobyr <ilya.bobir@gmail.com>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
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: Tue, 04 Mar 2014 11:01:51 -0800 [thread overview]
Message-ID: <xmqq1tyhlrds.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <53159A55.70105@gmail.com> (Ilya Bobyr's message of "Tue, 04 Mar 2014 01:18:13 -0800")
Ilya Bobyr <ilya.bobir@gmail.com> writes:
> On 3/4/2014 12:29 AM, Junio C Hamano wrote:
> ...
>> then you
>> shouldn't be mucking with environment variables in the first place,
>> primarily because running:
>>
>> $ GIT_TEST_ONLY='1 4' make test
>>
>> to run test .1 and .4 of all the test scripts would not make any
>> sense.
>
> No it does not. It only makes sense for one test suite.
>
>> I think your "simplicity" argument is a total red-herring.
>> Of course if you do not have to say the test script name, your
>> specification would be shorter, but that is only because your
>> specification is not specific enough to be useful.
>
> In my case it is very useful :)
It invites a nonsense usage (i.e. running "make test" under that
environment variable setting); that is not a good trade-off.
>> * Even though GIT_SKIP_TESTS mechanism still allows you to skip
>> individual test pieces, it has never been a serious "feature" in
>> the first place. Many of the tests unfortunately do rely on state
>> previous sequences of tests left behind, so it is not realistic
>> to expect that you can skip test pieces randomly and exercise
>> later test pieces reliably.
>>
>> * The numbering of individual test pieces can easily change by new
>> tests inserted in the middle; again, many tests do take advantge
>> of the states earlier tests leave behind, so "do not add new
>> tests in the middle" is not a realistic rule to enforce, unless
>> you are willing to clean up existing test scripts so that each
>> test piece is independent from all the previous ones.
>
> Both are true, but do not apply to the TDD case.
The existing tests are designed to be black-box tests, not function
level unit tests, and touching lower level code carelessly affects
other parts of the system you did not know the interactions about.
What does "TDD case" change anything in that equation?
next prev parent reply other threads:[~2014-03-04 19:02 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
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 [this message]
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=xmqq1tyhlrds.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ilya.bobir@gmail.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 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.