Commit graph

66 commits

Author SHA1 Message Date
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
Avery Pennarun
eae3e7cdef Add t/example, a basic example build environment suitable for a tutorial. 2010-11-18 22:48:46 -08:00
Avery Pennarun
b9853d3858 minimal/do: handle nonzero exit codes and set $1/$2 correctly.
Also add some tests to confirm this.
2010-11-17 19:07:27 -08:00
Avery Pennarun
c7585558ef If the .do script deletes $3, don't die. 2010-11-17 17:55:16 -08:00
Avery Pennarun
abbde40a4f Add README.md and LICENSE.
LGPLv2, by the way.
2010-11-17 00:53:58 -08:00
Avery Pennarun
c1f09f564b Support for default.*.do rules.
I *think* this was the last missing part from djb's spec.  Certainly it's an
important one for any real project.
2010-11-16 03:04:11 -08:00
Avery Pennarun
4243f31e1b Add minimal/do, a stripped-down redo implementation in 977 bytes of sh.
This could be good for distributing with your packages, so that people who
don't have redo installed can at least build it.  Also, we could use it for
building redo itself.

Will surely need to get slightly bigger as I inevitably discover I've
forgotten a critical feature.
2010-11-16 00:27:52 -08:00
Avery Pennarun
534dd9813f t/*.do: add some time delays.
These only take effect if you export SLEEP=1.  Useful for testing
parallelism.
2010-11-13 02:17:22 -08:00
Avery Pennarun
edd8382a52 Change the default rule name from 'it' to 'all'.
This is a departure from how djb seems to have it set up, but I just like it
better.  It's more like the reasonably-common Makefile standard.  (Although
what make *actually* does is just use the first target declared in the
file.)
2010-11-13 01:40:37 -08:00
Avery Pennarun
7505048093 redo-if*.py: import fewer things from helpers.
Just to keep track of how many helper functions we actually are using.  In
case I get brave and try to convert to C sometime.
2010-11-13 01:40:01 -08:00
Avery Pennarun
5417d0165a redo-ifcreate: barf if the file already exists.
I'm pretty sure this must be the intended behaviour.  It's kind of
meaningless to use this to declare a dependency on a file that might start
to exist later, if the file already exists.
2010-11-13 01:22:11 -08:00
Avery Pennarun
c57de820fb Move 'redo --ifchange' into 'redo-ifchange' to match djb's style.
It does simplify the logic of both redo.py and redo-ifchange.py, I suppose.
2010-11-13 00:47:49 -08:00
Avery Pennarun
425a295d6f Use a single .redo dir for the entire build. 2010-11-12 22:47:03 -08:00
Avery Pennarun
3c2fc49c63 Complicate the test build a bit to show unnecessary dependency re-checking.
'./redo -d test' reveals that we check and re-check things like CC and LD
even when they're children of objects that don't need to be rebuilt, and who
we've already checked earlier in the build cycle.  We need to be a little
smarter about pruning if we want dependency checking to be fast.
2010-11-12 22:15:34 -08:00
Avery Pennarun
07d3e3b13c Extremely basic integration of wvtest for testing.
And move test scripts into t/ subdir to keep things clean.

As part of that, make sure redo adds itself to the PATH on startup so that
subscripts can find it.
2010-11-12 17:19:42 -08:00