mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-29 10:04:41 +01:00
fbe50e087a
Since we now over-write the wally malloc/free functions, we need to do so for tests as well. Here we pull up all of the common setup/teardown logic into a separate place, and update the tests that use libwally to use the new common_setup core Changelog-None
34 lines
948 B
Makefile
34 lines
948 B
Makefile
COMMON_TEST_SRC := $(wildcard common/test/run-*.c)
|
|
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_TEST_PROGRAMS += $(COMMON_TEST_PROGRAMS)
|
|
ALL_OBJS += $(COMMON_TEST_PROGRAMS:=.o)
|
|
|
|
# Sphinx test wants to decode TLVs.
|
|
common/test/run-sphinx: wire/gen_onion_wire.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/gen_onion_wire.o \
|
|
wire/towire.o
|
|
|
|
update-mocks: $(COMMON_TEST_SRC:%=update-mocks/%)
|
|
|
|
check-units: $(COMMON_TEST_PROGRAMS:%=unittest/%)
|