Commit Graph

9 Commits

Author SHA1 Message Date
Rusty Russell ce96812ef0 test.sh: split into multiple scripts.
This significantly reduces re-testing of the same paths, and simplifies
the addition of new tests.

make check -j12 times:
	Before: 9m24.973s
	After:	7m52.005s

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-10 23:44:49 +10:30
Rusty Russell 3aca5c87e3 init: rebroadcast anchors on restart if we haven't seen them.
It's possible that we won't have sent the anchor, but state is
committed in db.  And our current philosophy is that we retransmit all
the txs dumbly, all the time.

Our --restart --timeout-anchor test trigger this case, too, so
re-enable that now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-09 18:52:15 +10:30
Rusty Russell 0f09605e17 test: restore anchor timeout tests.
Importantly, they're now entirely block driven.  We don't use
dev-setmocktime at all any more.

This also fixes a bug if we run the test twice against the same
bitcoind; we need to extract the time from the block header rather
than assuming bitcoind is on the current time.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-09 17:50:54 +10:30
Rusty Russell bbd1bbd931 state: remove anchor timeout.
We'll bring it back as a block-based timeout at the end.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-09 08:04:20 +10:30
Rusty Russell d3dc5508ad test.sh: run normal tests first.
That shows up obvious breakage, so do it first.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-08 21:57:55 +10:30
Rusty Russell 8477bd5a5f test: allow three variants in parallel with parallel make.
This means running 3 bitcoinds, which is slow enough to start on my laptop
that I need to increase the startup wait for 30 to 60 seconds, and similarly
the test.sh check loop.

Before:	real	13m42.868s
After:	real	8m19.563s (make -j3)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-08 21:56:55 +10:30
Rusty Russell 208beab529 test: setup bitcoind once, then run lightning tests.
On my build machine, times are:
Before:	real	22m10.425s
After:	real	17m56.862s

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-08 21:52:55 +10:30
Rusty Russell 8b7fa1b663 test: fix dependencies so we generate headers.
Revealed by "make check" on a freshly checked out tree.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-08 08:34:13 +10:30
Rusty Russell c11c81a920 daemon: first unit test, infrastructure.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-25 11:39:46 +09:30