Re: [PATCH/RFC] test-lib: clean up trash* directories on SIGINT
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 12, 2010, 08:56 UTC
- Message-ID
- <20100712085652.GA6837@burratino>
- In-Reply-To
- <AANLkTinGsIqy-rG8um1E7_zfla1KwsO2Z26JnchXaRLd@mail.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
> On Mon, Jul 12, 2010 at 06:16, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> So what should I do after noticing a heisenbug? > > Run the test again with --debug.
Sorry, I wasn’t clear. The sequence I was imagining (and have enountered) is:
$ make test [...] not ok - 35 something that really should have been okay ... more text streams by ...
-- wait, what? I’ve never seen that fail before. ^C
If I catch it early enough, I can inspect the trash directory and figure out what happened. Some bugs are hard to reproduce (and it avoids waiting for tests to run again). But I can use ^Z instead.
> If I keep doing that (along with --jobs 20 and --shuffle) I'll > eventually pile up ~200 MB of trash. That'll exceed the limits of my > ramdisk and I'll have to grudgingly do rm -rf trash* again.
Given this rationale, I don’t personally mind the change (though it is still not clear why not to run “make clean” from t/ between runs instead).
I would be more worried if you were proposing making the --immediate option remove the trash directory, too. I often use that option with the express intent of populating a test repository which is no more temporary than the .o files and copies of binaries in the build tree are.
Thanks for the explanation, Jonathan