mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
daemon: clean up test dirs.
Move final helpers out of test-cli/ Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
2
Makefile
2
Makefile
@@ -181,7 +181,7 @@ $(HELPER_OBJS) $(BITCOIN_OBJS) $(TEST_PROGRAMS:=.o): $(BITCOIN_HEADERS) $(CORE_H
|
|||||||
|
|
||||||
# These don't work in parallel, so we open-code them
|
# These don't work in parallel, so we open-code them
|
||||||
daemon-tests: daemon-all
|
daemon-tests: daemon-all
|
||||||
cd test-cli; scripts/shutdown.sh 2>/dev/null || true
|
daemon/test/scripts/shutdown.sh 2>/dev/null || true
|
||||||
set -e; for arg in "" "--timeout-anchor"; do daemon/test/test.sh $$arg; done
|
set -e; for arg in "" "--timeout-anchor"; do daemon/test/test.sh $$arg; done
|
||||||
|
|
||||||
test-onion: test/test_onion test/onion_key
|
test-onion: test/test_onion test/onion_key
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#! /bin/sh -e
|
#! /bin/sh -e
|
||||||
|
|
||||||
# We steal the test-cli scripts.
|
# Wherever we are, we want to be in daemon/test dir.
|
||||||
cd test-cli
|
cd `git rev-parse --show-toplevel`/daemon/test
|
||||||
|
|
||||||
. scripts/vars.sh
|
. scripts/vars.sh
|
||||||
|
|
||||||
@@ -59,8 +59,8 @@ while [ $# != 0 ]; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
LCLI1="../daemon/lightning-cli --lightning-dir=$DIR1"
|
LCLI1="../lightning-cli --lightning-dir=$DIR1"
|
||||||
LCLI2="../daemon/lightning-cli --lightning-dir=$DIR2"
|
LCLI2="../lightning-cli --lightning-dir=$DIR2"
|
||||||
|
|
||||||
if [ -n "$VERBOSE" ]; then
|
if [ -n "$VERBOSE" ]; then
|
||||||
FGREP="fgrep"
|
FGREP="fgrep"
|
||||||
@@ -176,14 +176,14 @@ if [ -n "$GDB1" ]; then
|
|||||||
echo Press return once you run: gdb --args daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR1 --bitcoin-datadir=$DATADIR
|
echo Press return once you run: gdb --args daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR1 --bitcoin-datadir=$DATADIR
|
||||||
read REPLY
|
read REPLY
|
||||||
else
|
else
|
||||||
$PREFIX ../daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR1 --bitcoin-datadir=$DATADIR > $REDIR1 2> $REDIRERR1 &
|
$PREFIX ../lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR1 --bitcoin-datadir=$DATADIR > $REDIR1 2> $REDIRERR1 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$GDB2" ]; then
|
if [ -n "$GDB2" ]; then
|
||||||
echo Press return once you run: gdb --args daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR2 --bitcoin-datadir=$DATADIR
|
echo Press return once you run: gdb --args daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR2 --bitcoin-datadir=$DATADIR
|
||||||
read REPLY
|
read REPLY
|
||||||
else
|
else
|
||||||
$PREFIX ../daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR2 --bitcoin-datadir=$DATADIR > $REDIR2 2> $REDIRERR2 &
|
$PREFIX ../lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR2 --bitcoin-datadir=$DATADIR > $REDIR2 2> $REDIRERR2 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
i=0
|
i=0
|
||||||
|
|||||||
24
test-cli/.gitignore
vendored
24
test-cli/.gitignore
vendored
@@ -1,24 +0,0 @@
|
|||||||
open-channel
|
|
||||||
open-anchor-scriptsigs
|
|
||||||
leak-anchor-sigs
|
|
||||||
open-commit-sig
|
|
||||||
check-commit-sig
|
|
||||||
check-anchor-scriptsigs
|
|
||||||
get-anchor-depth
|
|
||||||
create-steal-tx
|
|
||||||
create-commit-spend-tx
|
|
||||||
close-channel
|
|
||||||
create-close-tx
|
|
||||||
update-channel
|
|
||||||
update-channel-accept
|
|
||||||
update-channel-signature
|
|
||||||
update-channel-complete
|
|
||||||
create-commit-tx
|
|
||||||
open-anchor
|
|
||||||
txid-of
|
|
||||||
create-anchor-tx
|
|
||||||
update-channel-htlc
|
|
||||||
update-channel-htlc-complete
|
|
||||||
update-channel-htlc-remove
|
|
||||||
create-htlc-spend-tx
|
|
||||||
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
You can see my example test scripts `test-cli/scripts/setup.sh` and
|
|
||||||
`test-cli/scripts/test.sh`. They are designed to be run from the `test-cli`
|
|
||||||
directory.
|
|
||||||
|
|
||||||
These are set up for Elements alpha; if you want to use bitcoind (and
|
|
||||||
thus NOPs instead of OP_CHECKLOCKTIMEVERIFY and
|
|
||||||
OP_CHECKSEQUENCEVERIFY, as well as being vulnerable to malleability)
|
|
||||||
you can change the "FEATURES :=" line in `Makefile` (and `make clean`)
|
|
||||||
|
|
||||||
You can see other settings in `test-cli/scripts/vars.sh`.
|
|
||||||
|
|
||||||
As the utilities un test-cli don't keep any state, and don't talk to
|
|
||||||
bitcoind/alphad, the commandlines get ugly fast (and don't handle all
|
|
||||||
cases). They're only for testing.
|
|
||||||
|
|
||||||
Good luck!
|
|
||||||
|
|
||||||
Rusty.
|
|
||||||
Reference in New Issue
Block a user