[darcs-users] Why are tests done in reverse order by default?

Eric Kow kowey at darcs.net
Fri Oct 24 09:56:41 UTC 2008


On Fri, Oct 24, 2008 at 20:45:31 +1100, Trent W. Buck wrote:
> I don't agree; running the tests in a deterministic order (and more
> importantly, in the same working directory) means that bugs in one
> test can hide brokenness in another test.

Hmm.  Good point.

> When I removed the sort -r, resulting in pure lexicographic sorting
> (because I use LC_COLLATE=C), I already found two bugs where scripts
> assumed that temp1 didn't already exist.

Note this is actually two bugs in one.  Script A fails to clean up
after itself (for example, maybe it does rm -rf temp1, but does it cd ..
out of the its current darcs directory first?) and Script B assumes
that the previous script has cleaned up after itself...  Then again, do
we really want this systematic cleaning up after self in the scripts?

> In fact, I could make a case that randomizing the test order (sort -R)
> is the best approach, because it allows us to check that there are no
> implied dependency orderings.

Nod.

I'm a little bit nervous about not being able to understand what the
test harness is doing, but let's try it! :-)

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081024/3fe8fd96/attachment.pgp 


More information about the darcs-users mailing list