Commit graph

9 commits

Author SHA1 Message Date
Avery Pennarun
d5e6951111 t/curse/Makefile: delete.
I don't remember why it was there, but we clearly don't use it anymore.
2011-03-10 14:36:45 -08:00
Avery Pennarun
95680ed7ef Switch to using a separate lockfile per target.
The previous method, using fcntl byterange locks, was very efficient and
avoided unnecessarily filesystem metadata churn (ie. creating/deleting
inodes).  Unfortunately, MacOS X (at least version 10.6.5) apparently has a
race condition in its fcntl locking that makes it unusably unreliable
(http://apenwarr.ca/log/?m=201012#13).

My tests indicate that if you only ever lock a *single* byterange on a file,
the race condition doesn't cause a problem.  So let's just use one lockfile
per target.  Now "redo -j20 test" passes for me on both MacOS and Linux.

This doesn't measurably affect the speed on Linux, at least, in my tests.

The bad news: it's hard to safely *delete* those lockfiles when we're done
with them, so they tend to accumulate in the .redo dir.
2010-12-14 02:44:29 -08:00
Avery Pennarun
8f9453a55d Fix tests on MacOS.
This comes down to the lack of a 'seq' command (what?!) and the fact that
BSD "wc -l" returns extra whitespace, while the GNU version doesn't.  We
should be using numeric comparisons instead of string comparisons, and then
it's ok.
2010-12-12 05:38:30 -08:00
Avery Pennarun
b9987433c9 Disable the tests that don't work with minimal/do.
...only when running under minimal/do, of course.

The tests in question mostly fail because they're testing particular
dependency-related behaviour, and minimal/do doesn't support dependencies,
so naturally it doesn't work.
2010-12-11 21:06:12 -08:00
Avery Pennarun
39ef065443 Refactor all.do and test.do in various directories.
Now 'redo test' runs the tests, but 'redo t' just builds the programs.

Also removed wvtest stuff; we're not really using it properly anyway and
it's not helping our testing right now.  It might come back later.
2010-11-21 05:47:48 -08:00
Avery Pennarun
de042fc2f2 t/curse: add a Makefile so we can compare speed when using GNU make.
redo: 5.4s
redo -j4: 3.0s
make: 2.3s
make -j4: 1.4s
make SHELL=/bin/dash: 1.2s
make SHELL=/bin/dash -j4: 0.83s

We have some distance to go yet.  Of course, redo is still written in
python, not C, so it's very expensive, and the on-disk dependency store is
very inefficient.
2010-11-21 00:31:48 -08:00
Avery Pennarun
65d4639b48 t/curse: test that 'redo' (not redo-ifchange) always redoes a command.
...if the containing .do file is getting redone at all, of course.

Currently passes in serial mode, fails in parallel.
2010-11-19 02:20:17 -08:00
Avery Pennarun
ec6f61949b t/curse: test to make sure the same file isn't generated more than once.
redo currently passes this when running serially, but not in parallel.
2010-11-19 00:55:36 -08:00
Avery Pennarun
9b23b2c67a Add t/curse, a multi-level dependency build that really aggravates redo.
...because it seems my locking isn't very good.  It exposes annoying
problems involving rebuilding the same files more than once, screwing up
stamp files with redo -j, and being unnecessarily slow when checking
dependencies.  So it's a pretty good test considering how simple it is.

Didn't add it to t/all.do yet, because it would fail.
2010-11-19 00:28:16 -08:00