core-lightning/common/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

37 lines
999 B
Makefile

COMMON_TEST_SRC := $(wildcard common/test/run-*.c)
ifeq ($(EXPERIMENTAL_FEATURES),1)
COMMON_TEST_SRC += $(wildcard common/test/exp-run-*.c)
endif
COMMON_TEST_OBJS := $(COMMON_TEST_SRC:.c=.o)
COMMON_TEST_PROGRAMS := $(COMMON_TEST_OBJS:.o=)
COMMON_TEST_COMMON_OBJS := \
common/setup.o \
common/utils.o
$(COMMON_TEST_PROGRAMS): $(COMMON_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
$(COMMON_TEST_OBJS): $(COMMON_HEADERS) $(WIRE_HEADERS) $(COMMON_SRC)
ALL_C_SOURCES += $(COMMON_TEST_SRC)
ALL_TEST_PROGRAMS += $(COMMON_TEST_PROGRAMS)
# Sphinx test wants to decode TLVs.
common/test/run-sphinx: wire/onion$(EXP)_wiregen.o wire/towire.o wire/fromwire.o
common/test/run-param \
common/test/run-json: \
common/amount.o \
common/base32.o \
common/bigsize.o \
common/json.o \
common/json_stream.o \
common/wireaddr.o \
common/type_to_string.o \
wire/fromwire.o \
wire/onion$(EXP)_wiregen.o \
wire/towire.o
check-units: $(COMMON_TEST_PROGRAMS:%=unittest/%)