[MERGE] revert deletes files when it is safe

Aaron Bentley aaron.bentley at utoronto.ca
Fri Sep 29 01:24:05 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Wed, 2006-09-27 at 16:04 -0500, John Arbash Meinel wrote:
>>>>> I *think* Robert is wanting to switch the tests over to MemoryTree
>> where
>>>>> possible. Which means he can change build_tree_contents() to work
>> on a
>>>>> Transport, and not have to actually write to disk for lots of
>> tests.
>>> I'm not entirely comfortable with this kind of simulation, but I
>> wasn't
>>> trying to block it.  I think we should get Martin to write a sequel
>> for
>>> distcc: distunittest.
>> I think he was planning to only do it when the test cares more about
>> the
>> branch stuff, and not the working tree. And only uses a working tree
>> to
>> create revisions. Which is moderately safe IMO. 
> 
> Basically I want the test suite to be extremely fast again. 5 minutes is
> too long for a good 'read, edit, run' loop. Running just a few tests
> leads to surprises later on.

I understand and agree with that.

> 
> Ideally most tests will test one and only one thing. Support
> infrastructure to test that thing should be unobtrusive and fast. For
> instance, a test that WorkingTree.commit() uses commitbuilder in the
> expected way does not need disk resources - so we can use a MemoryTree. 

It comforts me to know that tests are testing more than one thing,
because I know how hard it is to cover all cases.  Frequently when I
make a mistake, the test case that catches it is one that was never
intended to detect that problem.

Anyhow, that's why my gut reaction is discomfort.  I wouldn't call it my
considered opinion.

And I find that tests which test only one thing lead to repeated set-up
and tear-down, which also makes the test suite slower.

> John - dumping to disk - I dont plan on that, we have a very good
> introspection tool in pdb. I'm happy to defer converting tests where it
> seems like that is important until there is a 'dump to disk after
> failure' option, but honestly, in the last year I've used --keep-output
> once.

I use pdb a lot, but I also use keep-output frequently.  Maybe a tenth
as often as pdb, but it still adds up to plenty.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFHGel0F+nu1YWqI0RAlVwAJ47O9w1geu4tm4JM7Es3klFnAsW9ACeKOQi
H5HFmM2FuPigIU2Yt12XjsY=
=sdZS
-----END PGP SIGNATURE-----




More information about the bazaar mailing list