core-lightning/test/Makefile
Rusty Russell 739b163f8b Makefiles: simplify dependencies.
Gather all binaries and objects and make the depend on external
requirements and common headers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-29 17:54:14 +02:00

20 lines
572 B
Makefile

TEST_PROGRAMS := \
test/test_protocol
TEST_COMMON_OBJS := \
common/utils.o
$(TEST_PROGRAMS): $(TEST_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS)
ALL_TEST_PROGRAMS += $(TEST_PROGRAMS)
ALL_OBJS += $(TEST_PROGRAMS:=.o)
test-protocol: test/test_protocol
@set -e; TMP=`mktemp`; for f in test/commits/*.script; do if ! $(VALGRIND) 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: test-protocol
clean: test-clean
test-clean:
$(RM) $(TEST_PROGRAMS) $(TEST_PROGRAMS:=.o)