2018-01-20 15:07:31 +10:30
|
|
|
# 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 10:43:25 +09:30
|
|
|
ALL_C_SOURCES += $(CLI_TEST_SRC)
|
2018-01-20 15:07:31 +10:30
|
|
|
ALL_TEST_PROGRAMS += $(CLI_TEST_PROGRAMS)
|
|
|
|
|
|
|
|
CLI_TEST_COMMON_OBJS := \
|
2021-09-21 16:53:10 +09:30
|
|
|
common/autodata.o \
|
2018-01-20 15:07:31 +10:30
|
|
|
common/configdir.o \
|
2023-06-02 12:05:51 +09:30
|
|
|
common/configvar.o \
|
2018-01-20 15:07:31 +10:30
|
|
|
common/daemon_conn.o \
|
|
|
|
common/htlc_state.o \
|
2022-07-04 13:19:38 +09:30
|
|
|
common/json_parse_simple.o \
|
2018-01-20 15:07:31 +10:30
|
|
|
common/pseudorand.o \
|
|
|
|
common/memleak.o \
|
|
|
|
common/msg_queue.o \
|
2021-11-15 04:22:46 +10:30
|
|
|
common/setup.o \
|
2018-01-20 15:07:31 +10:30
|
|
|
common/utils.o \
|
2023-06-02 12:06:04 +09:30
|
|
|
common/version.o \
|
2018-01-20 15:07:31 +10:30
|
|
|
common/permute_tx.o
|
|
|
|
|
2022-07-16 14:25:09 +09:30
|
|
|
$(CLI_TEST_PROGRAMS): libccan.a $(BITCOIN_OBJS) $(WIRE_OBJS) $(CLI_TEST_COMMON_OBJS)
|
2018-01-20 15:07:31 +10:30
|
|
|
|
|
|
|
$(CLI_TEST_OBJS): $(LIGHTNING_CLI_HEADERS) $(LIGHTNING_CLI_SRC)
|
|
|
|
|
2019-06-20 13:13:14 -05:00
|
|
|
check-units: $(CLI_TEST_PROGRAMS:%=unittest/%)
|