Rusty Russell
edc30b12ea
lightningd: --dev-debugger=<subdaemon>
Or for blackbox tests --gdb1=<subdaemon> / --gdb2=<subdaemon>.
This makes the subdaemon wait as soon as it's execed, so we can attach
the debugger.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
5475666b7e
lightningd: simple wallet support.
This allows us to add funds via the P2SH-wrapped Segwit Transactions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
e39d09d5a5
daemon/test/scripts: maek slightly more general for lightningd/lightningd
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
05feefbb8a
test: move mockup script outside daemon/
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
d30b67a3fe
test: generalize update-mocks
So we can use it in other directories.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
c7b69abdaa
type_to_string: move formatting to appropriate files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
0ba93cb948
lightningd: don't listen at all if no port number set.
When we support the Milan protocol, we'll use a default port. But
for now, don't listen at all unless a port is specified.
Fixes : #54
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
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>
8 years ago
Rusty Russell
fae7f68731
helpers.sh: make check_tx_spend able to check for a specific transaction.
It currently takes an unused "who to blame" argument, which doesn't
always make sense.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
c6a187a5d7
helpers.sh: set up funding in start_lightningd()
Every test wants this anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
9e777ae922
test.sh: move core routines to scripts/helpers.sh
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
973ef3c932
test.sh: move valgrind PREFIX setting to vars.sh
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
700c536a27
Makefile: remove all the old Elements Alpha support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
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>
8 years ago
Rusty Russell
9b045dac02
test: shutdown harder.
Sometimes bitcoind takes a while to shutdown. Just kill it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
2f0651d105
test: use eatmydata for bitcoind and lightningd if available.
Before: real 17m56.862s
After: real 13m42.868s
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
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>
8 years ago
Rusty Russell
d8892c4dda
test: do version check during setup.
Waiting until lightningd is up is too long: do a --version test in setup,
and then check that all reported versions match later on.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
35b2ee9c42
tests: remove obsolete BIP68 detection test.
We've assumed this for ages anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
6fe5ecb2ac
update-mocks: make mocks compile with -Wunused
Do this by scattering UNNEEDED everywhere, except in the case of (void).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
b22bdfcbe8
test: use random port/rpcport for bitcoind.
This means we don't get confused if a testnet bitcoind already running.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
c11c81a920
daemon: first unit test, infrastructure.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
7b1187d446
check: make (successful) tests less noisy.
Particularly, don't show the output for generating 432 blocks!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
2436207a7a
test: detect segwit correctly, assume master branch.
Segwit was merged, but the strings changed between there and segwit4
(also, my BIP9 patch changed the output).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
4bbb86ae30
daemon: clean up test dirs.
Move final helpers out of test-cli/
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago