2018-01-20 05:37:31 +01:00
|
|
|
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
|
|
|
|
# That allows for unit testing of statics, and special effects.
|
|
|
|
CLI_TEST_SRC := $(wildcard cli/test/run-*.c)
|
|
|
|
CLI_TEST_OBJS := $(CLI_TEST_SRC:.c=.o)
|
|
|
|
CLI_TEST_PROGRAMS := $(CLI_TEST_OBJS:.o=)
|
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
ALL_C_SOURCES += $(CLI_TEST_SRC)
|
2018-01-20 05:37:31 +01:00
|
|
|
ALL_TEST_PROGRAMS += $(CLI_TEST_PROGRAMS)
|
|
|
|
|
|
|
|
CLI_TEST_COMMON_OBJS := \
|
2021-09-21 09:23:10 +02:00
|
|
|
common/autodata.o \
|
2018-01-20 05:37:31 +01:00
|
|
|
common/configdir.o \
|
|
|
|
common/daemon_conn.o \
|
|
|
|
common/htlc_state.o \
|
2022-07-04 05:49:38 +02:00
|
|
|
common/json_parse_simple.o \
|
2018-01-20 05:37:31 +01:00
|
|
|
common/pseudorand.o \
|
|
|
|
common/memleak.o \
|
|
|
|
common/msg_queue.o \
|
2021-11-14 18:52:46 +01:00
|
|
|
common/setup.o \
|
2018-01-20 05:37:31 +01:00
|
|
|
common/utils.o \
|
|
|
|
common/type_to_string.o \
|
|
|
|
common/permute_tx.o
|
|
|
|
|
2022-07-16 06:55:09 +02:00
|
|
|
$(CLI_TEST_PROGRAMS): libccan.a $(BITCOIN_OBJS) $(WIRE_OBJS) $(CLI_TEST_COMMON_OBJS)
|
2018-01-20 05:37:31 +01:00
|
|
|
|
|
|
|
$(CLI_TEST_OBJS): $(LIGHTNING_CLI_HEADERS) $(LIGHTNING_CLI_SRC)
|
|
|
|
|
2019-06-20 20:13:14 +02:00
|
|
|
check-units: $(CLI_TEST_PROGRAMS:%=unittest/%)
|