From 4beaedfa49590c7b7f976ff7ee0656e6ff1138d0 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 6 May 2016 16:22:47 +0930 Subject: [PATCH] daemon/test: clean up Makefile. This means mkae tells us directly what failed. Signed-off-by: Rusty Russell --- Makefile | 13 ++++++++++--- daemon/test/test.sh | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c73497041..2ffd810a9 100644 --- a/Makefile +++ b/Makefile @@ -184,10 +184,17 @@ $(CCAN_OBJS) $(CDUMP_OBJS) $(HELPER_OBJS) $(BITCOIN_OBJS) $(TEST_PROGRAMS:=.o): # Except for CCAN, everything depends on bitcoin/ and core headers. $(HELPER_OBJS) $(BITCOIN_OBJS) $(TEST_PROGRAMS:=.o): $(BITCOIN_HEADERS) $(CORE_HEADERS) $(GEN_HEADERS) -# These don't work in parallel, so we open-code them -daemon-tests: daemon-all +daemon-test-%: daemon/test/scripts/shutdown.sh 2>/dev/null || true - set -e; for arg in "--steal" "--dump-onchain" "" "--timeout-anchor"; do daemon/test/test.sh $$arg; done + daemon/test/test.sh --$* + +# These don't work in parallel, so chain the deps +daemon-test-steal: daemon-test-dump-onchain +daemon-test-dump-onchain: daemon-test-timeout-anchor +daemon-test-timeout-anchor: daemon-test-normal +daemon-test-normal: daemon-all + +daemon-tests: daemon-test-steal test-onion: test/test_onion test/onion_key set -e; TMPF=/tmp/onion.$$$$; test/test_onion --generate $$(test/onion_key --pub `seq 20`) > $$TMPF; for k in `seq 20`; do test/test_onion --decode $$(test/onion_key --priv $$k) < $$TMPF > $$TMPF.unwrap; mv $$TMPF.unwrap $$TMPF; done; rm -f $$TMPF diff --git a/daemon/test/test.sh b/daemon/test/test.sh index f47ed98e7..a7b49773d 100755 --- a/daemon/test/test.sh +++ b/daemon/test/test.sh @@ -55,6 +55,8 @@ while [ $# != 0 ]; do x"--steal") STEAL=1 ;; + x"--normal") + ;; x"--verbose") VERBOSE=1 ;;