diff --git a/Makefile b/Makefile index 45393a829..faba78a71 100644 --- a/Makefile +++ b/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 diff --git a/test-cli/scripts/generate-block.sh b/daemon/test/scripts/generate-block.sh similarity index 100% rename from test-cli/scripts/generate-block.sh rename to daemon/test/scripts/generate-block.sh diff --git a/test-cli/scripts/get-new-address.sh b/daemon/test/scripts/get-new-address.sh similarity index 100% rename from test-cli/scripts/get-new-address.sh rename to daemon/test/scripts/get-new-address.sh diff --git a/test-cli/scripts/getinput.sh b/daemon/test/scripts/getinput.sh similarity index 100% rename from test-cli/scripts/getinput.sh rename to daemon/test/scripts/getinput.sh diff --git a/test-cli/scripts/setup.sh b/daemon/test/scripts/setup.sh similarity index 100% rename from test-cli/scripts/setup.sh rename to daemon/test/scripts/setup.sh diff --git a/test-cli/scripts/shutdown.sh b/daemon/test/scripts/shutdown.sh similarity index 100% rename from test-cli/scripts/shutdown.sh rename to daemon/test/scripts/shutdown.sh diff --git a/test-cli/scripts/vars.sh b/daemon/test/scripts/vars.sh similarity index 100% rename from test-cli/scripts/vars.sh rename to daemon/test/scripts/vars.sh diff --git a/daemon/test/test.sh b/daemon/test/test.sh index 4374b55c8..52e217516 100755 --- a/daemon/test/test.sh +++ b/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 diff --git a/test-cli/.gitignore b/test-cli/.gitignore deleted file mode 100644 index 105669531..000000000 --- a/test-cli/.gitignore +++ /dev/null @@ -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 - diff --git a/test-cli/HOWTO-USE.md b/test-cli/HOWTO-USE.md deleted file mode 100644 index 8aa69692b..000000000 --- a/test-cli/HOWTO-USE.md +++ /dev/null @@ -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.