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=)
|
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
ALL_C_SOURCES += $(CHANNELD_TEST_SRC)
|
2017-11-20 07:10:51 +01:00
|
|
|
ALL_TEST_PROGRAMS += $(CHANNELD_TEST_PROGRAMS)
|
|
|
|
|
|
|
|
CHANNELD_TEST_COMMON_OBJS := \
|
2019-02-21 04:45:55 +01:00
|
|
|
common/amount.o \
|
2021-09-09 04:50:52 +02:00
|
|
|
common/channel_type.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/msg_queue.o \
|
2020-05-16 00:13:22 +02:00
|
|
|
common/permute_tx.o \
|
|
|
|
common/pseudorand.o \
|
|
|
|
common/setup.o \
|
2017-11-20 07:10:51 +01:00
|
|
|
common/type_to_string.o \
|
2020-05-16 00:13:22 +02:00
|
|
|
common/utils.o
|
2017-11-20 07:10:51 +01:00
|
|
|
|
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
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
$(CHANNELD_TEST_OBJS): $(CHANNELD_HEADERS) $(CHANNELD_SRC)
|
2017-11-20 07:10:51 +01:00
|
|
|
|
2019-06-20 20:13:14 +02:00
|
|
|
check-units: $(CHANNELD_TEST_PROGRAMS:%=unittest/%)
|