Browse Source

daemon: clean up test dirs.

Move final helpers out of test-cli/

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 9 years ago
parent
commit
4bbb86ae30
  1. 2
      Makefile
  2. 0
      daemon/test/scripts/generate-block.sh
  3. 0
      daemon/test/scripts/get-new-address.sh
  4. 0
      daemon/test/scripts/getinput.sh
  5. 0
      daemon/test/scripts/setup.sh
  6. 0
      daemon/test/scripts/shutdown.sh
  7. 0
      daemon/test/scripts/vars.sh
  8. 12
      daemon/test/test.sh
  9. 24
      test-cli/.gitignore
  10. 18
      test-cli/HOWTO-USE.md

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
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
test-onion: test/test_onion test/onion_key

0
test-cli/scripts/generate-block.sh → daemon/test/scripts/generate-block.sh

0
test-cli/scripts/get-new-address.sh → daemon/test/scripts/get-new-address.sh

0
test-cli/scripts/getinput.sh → daemon/test/scripts/getinput.sh

0
test-cli/scripts/setup.sh → daemon/test/scripts/setup.sh

0
test-cli/scripts/shutdown.sh → daemon/test/scripts/shutdown.sh

0
test-cli/scripts/vars.sh → daemon/test/scripts/vars.sh

12
daemon/test/test.sh

@ -1,7 +1,7 @@
#! /bin/sh -e
# We steal the test-cli scripts.
cd test-cli
# Wherever we are, we want to be in daemon/test dir.
cd `git rev-parse --show-toplevel`/daemon/test
. scripts/vars.sh
@ -59,8 +59,8 @@ while [ $# != 0 ]; do
shift
done
LCLI1="../daemon/lightning-cli --lightning-dir=$DIR1"
LCLI2="../daemon/lightning-cli --lightning-dir=$DIR2"
LCLI1="../lightning-cli --lightning-dir=$DIR1"
LCLI2="../lightning-cli --lightning-dir=$DIR2"
if [ -n "$VERBOSE" ]; then
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
read REPLY
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
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
read REPLY
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
i=0

24
test-cli/.gitignore

@ -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

18
test-cli/HOWTO-USE.md

@ -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.
Loading…
Cancel
Save