mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
bitcoin: add test programs to ALL_TEST_PROGRAMS
* Add BITCOIN_TEST_PROGRAMS to ALL_TEST_PROGRAMS * Refactor bitcoin test make directives into its own Makefile under bitcoin/test Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
5421e9f6f2
commit
3cb03ab784
@ -38,19 +38,6 @@ check-source: $(BITCOIN_SRC:%=check-src-include-order/%) \
|
||||
# Bitcoin objects depends on bitcoin/ external/ and ccan
|
||||
$(BITCOIN_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(EXTERNAL_HEADERS)
|
||||
|
||||
# Note that these actually #include everything they need, except ccan/.
|
||||
# That allows for unit testing of statics, and special effects.
|
||||
|
||||
BITCOIN_TEST_SRC := $(wildcard bitcoin/test/run-*.c)
|
||||
BITCOIN_TEST_OBJS := $(BITCOIN_TEST_SRC:.c=.o)
|
||||
BITCOIN_TEST_PROGRAMS := $(BITCOIN_TEST_OBJS:.o=)
|
||||
|
||||
$(BITCOIN_TEST_PROGRAMS): $(CCAN_OBJS)
|
||||
|
||||
$(BITCOIN_TEST_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(BITCOIN_SRC)
|
||||
|
||||
check: bitcoin-tests
|
||||
|
||||
check-source-bolt: $(BITCOIN_SRC:%=bolt-check/%) $(BITCOIN_HEADERS:%=bolt-check/%)
|
||||
|
||||
check-makefile: check-bitcoin-makefile
|
||||
@ -60,9 +47,9 @@ check-bitcoin-makefile:
|
||||
|
||||
check-whitespace: $(BITCOIN_SRC:%=check-whitespace/%) $(BITCOIN_HEADERS:%=check-whitespace/%) check-whitespace/bitcoin/Makefile
|
||||
|
||||
bitcoin-tests: $(BITCOIN_TEST_PROGRAMS:%=unittest/%)
|
||||
|
||||
clean: bitcoin-clean
|
||||
|
||||
bitcoin-clean:
|
||||
$(RM) $(BITCOIN_OBJS) $(BITCOIN_TEST_PROGRAMS) $(BITCOIN_TEST_OBJS)
|
||||
|
||||
include bitcoin/test/Makefile
|
||||
|
15
bitcoin/test/Makefile
Normal file
15
bitcoin/test/Makefile
Normal file
@ -0,0 +1,15 @@
|
||||
BITCOIN_TEST_SRC := $(wildcard bitcoin/test/run-*.c)
|
||||
BITCOIN_TEST_OBJS := $(BITCOIN_TEST_SRC:.c=.o)
|
||||
BITCOIN_TEST_PROGRAMS := $(BITCOIN_TEST_OBJS:.o=)
|
||||
|
||||
BITCOIN_TEST_COMMON_OBJS :=
|
||||
|
||||
$(BITCOIN_TEST_PROGRAMS): $(CCAN_OBJS) $(BITCOIN_TEST_COMMON_OBJS)
|
||||
$(BITCOIN_TEST_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(BITCOIN_SRC)
|
||||
|
||||
ALL_TEST_PROGRAMS += $(BITCOIN_TEST_PROGRAMS)
|
||||
ALL_OBJS += $(BITCOIN_TEST_PROGRAMS:=.o)
|
||||
|
||||
update-mocks: $(BITCOIN_TEST_SRC:%=update-mocks/%)
|
||||
|
||||
check: $(BITCOIN_TEST_PROGRAMS:%=unittest/%)
|
Loading…
Reference in New Issue
Block a user