2017-11-20 07:10:51 +01:00
|
|
|
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
|
|
|
|
# That allows for unit testing of statics, and special effects.
|
|
|
|
CHANNELD_TEST_SRC := $(wildcard channeld/test/run-*.c)
|
|
|
|
CHANNELD_TEST_OBJS := $(CHANNELD_TEST_SRC:.c=.o)
|
|
|
|
CHANNELD_TEST_PROGRAMS := $(CHANNELD_TEST_OBJS:.o=)
|
|
|
|
|
|
|
|
ALL_TEST_PROGRAMS += $(CHANNELD_TEST_PROGRAMS)
|
2017-11-21 03:58:17 +01:00
|
|
|
ALL_OBJS += $(CHANNELD_TEST_OBJS)
|
2017-11-20 07:10:51 +01:00
|
|
|
|
|
|
|
CHANNELD_TEST_COMMON_OBJS := \
|
2019-02-21 04:45:55 +01:00
|
|
|
common/amount.o \
|
2017-11-20 07:10:51 +01:00
|
|
|
common/daemon_conn.o \
|
|
|
|
common/htlc_state.o \
|
2019-05-31 09:30:32 +02:00
|
|
|
common/htlc_trim.o \
|
2018-12-03 00:01:04 +01:00
|
|
|
common/htlc_tx.o \
|
|
|
|
common/initial_commit_tx.o \
|
|
|
|
common/key_derive.o \
|
2017-11-20 07:10:51 +01:00
|
|
|
common/pseudorand.o \
|
|
|
|
common/msg_queue.o \
|
|
|
|
common/utils.o \
|
|
|
|
common/type_to_string.o \
|
|
|
|
common/permute_tx.o
|
|
|
|
|
|
|
|
update-mocks: $(CHANNELD_TEST_SRC:%=update-mocks/%)
|
|
|
|
|
2019-04-30 23:07:31 +02:00
|
|
|
$(CHANNELD_TEST_PROGRAMS): $(CCAN_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(CHANNELD_TEST_COMMON_OBJS)
|
2017-11-20 07:10:51 +01:00
|
|
|
|
2017-11-21 03:58:17 +01:00
|
|
|
$(CHANNELD_TEST_OBJS): $(LIGHTNING_CHANNELD_HEADERS) $(LIGHTNING_CHANNELD_SRC)
|
2017-11-20 07:10:51 +01:00
|
|
|
|
2019-06-20 20:13:14 +02:00
|
|
|
check-units: $(CHANNELD_TEST_PROGRAMS:%=unittest/%)
|