|
|
@ -10,6 +10,9 @@ CCANDIR := ccan |
|
|
|
# Where we keep the BOLT RFCs
|
|
|
|
BOLTDIR := ../lightning-rfc/ |
|
|
|
|
|
|
|
# If you don't have (working) valgrind.
|
|
|
|
#NO_VALGRIND := 1
|
|
|
|
|
|
|
|
# Bitcoin uses DER for signatures (Add BIP68 & HAS_CSV if it's supported)
|
|
|
|
BITCOIN_FEATURES := \
|
|
|
|
-DHAS_BIP68=1 \
|
|
|
@ -187,7 +190,7 @@ $(HELPER_OBJS) $(BITCOIN_OBJS) $(TEST_PROGRAMS:=.o): $(BITCOIN_HEADERS) $(CORE_H |
|
|
|
|
|
|
|
daemon-test-%: |
|
|
|
daemon/test/scripts/shutdown.sh 2>/dev/null || true |
|
|
|
daemon/test/test.sh --$* |
|
|
|
NO_VALGRIND=$(NO_VALGRIND) daemon/test/test.sh --$* |
|
|
|
|
|
|
|
# These don't work in parallel, so chain the deps
|
|
|
|
daemon-test-steal: daemon-test-dump-onchain |
|
|
@ -211,7 +214,7 @@ test-onion4: test/test_onion test/onion_key |
|
|
|
set -e; TMPF=/tmp/onion.$$$$; python test/test_onion.py generate $$(test/onion_key --pub `seq 20`) > $$TMPF; for k in `seq 20`; do python test/test_onion.py decode $$(test/onion_key --priv $$k) $$(test/onion_key --pub $$k) < $$TMPF > $$TMPF.unwrap; mv $$TMPF.unwrap $$TMPF; done; rm -f $$TMPF |
|
|
|
|
|
|
|
test-protocol: test/test_protocol |
|
|
|
set -e; TMP=`mktemp`; for f in test/commits/*.script; do if ! test/test_protocol < $$f > $$TMP; then echo "test/test_protocol < $$f FAILED" >&2; exit 1; fi; diff -u $$TMP $$f.expected; done; rm $$TMP |
|
|
|
set -e; TMP=`mktemp`; [ -n "$(NO_VALGRIND)" ] || PREFIX="valgrind -q --error-exitcode=7"; for f in test/commits/*.script; do if ! $$PREFIX test/test_protocol < $$f > $$TMP; then echo "test/test_protocol < $$f FAILED" >&2; exit 1; fi; diff -u $$TMP $$f.expected; done; rm $$TMP |
|
|
|
|
|
|
|
check: daemon-tests test-onion test-protocol bitcoin-tests |
|
|
|
|
|
|
|