core-lightning/connectd/test/Makefile
Rusty Russell 25b5e1e099 update-mocks: make sure we cover all test programs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-22 17:53:04 +09:30

24 lines
772 B
Makefile

# Note that these actually #include everything they need, except ccan/ and bitcoin/.
# That allows for unit testing of statics, and special effects.
CONNECTD_TEST_SRC := $(wildcard connectd/test/run-*.c)
CONNECTD_TEST_OBJS := $(CONNECTD_TEST_SRC:.c=.o)
CONNECTD_TEST_PROGRAMS := $(CONNECTD_TEST_OBJS:.o=)
CONNECTD_TEST_COMMON_OBJS := \
common/features.o \
common/pseudorand.o \
common/setup.o \
common/type_to_string.o \
common/utils.o
ALL_C_SOURCES += $(CONNECTD_TEST_SRC)
ALL_TEST_PROGRAMS += $(CONNECTD_TEST_PROGRAMS)
$(CONNECTD_TEST_PROGRAMS): $(CONNECTD_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
# Test objects depend on ../ src and headers.
$(CONNECTD_TEST_OBJS): $(CONNECTD_HEADERS) $(CONNECTD_SRC)
check-units: $(CONNECTD_TEST_PROGRAMS:%=unittest/%)