core-lightning/wallet/test/Makefile
niftynei fbe50e087a setup: create a common setup which will handle the wally-context
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
2020-05-19 13:35:42 +09:30

42 lines
1.1 KiB
Makefile

WALLET_TEST_SRC := $(wildcard wallet/test/run-*.c)
WALLET_TEST_OBJS := $(WALLET_TEST_SRC:.c=.o)
WALLET_TEST_PROGRAMS := $(WALLET_TEST_OBJS:.o=)
WALLET_TEST_COMMON_OBJS := \
common/amount.o \
common/base32.o \
common/derive_basepoints.o \
common/htlc_state.o \
common/htlc_wire.o \
common/fee_states.o \
common/type_to_string.o \
common/memleak.o \
common/node_id.o \
common/onionreply.o \
common/key_derive.o \
common/pseudorand.o \
common/setup.o \
common/timeout.o \
common/utils.o \
common/wireaddr.o \
common/version.o \
wallet/db_sqlite3.o \
wire/towire.o \
wire/fromwire.o
# Make sure these depend on everything.
ALL_TEST_PROGRAMS += $(WALLET_TEST_PROGRAMS)
ALL_OBJS += $(WALLET_LIB_OBJS) $(WALLET_TEST_OBJS)
$(WALLET_TEST_PROGRAMS): $(BITCOIN_OBJS) $(WALLET_TEST_COMMON_OBJS)
$(WALLET_TEST_OBJS): $(WALLET_LIB_HEADERS) $(WALLET_LIB_SRC)
wallet/tests: $(WALLET_TEST_PROGRAMS:%=unittest/%)
$(WALLET_TEST_PROGRAMS): $(WALLET_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
$(WALLET_TEST_OBJS): $(WALLET_SRC)
update-mocks: $(WALLET_TEST_SRC:%=update-mocks/%)
check-units: $(WALLET_TEST_PROGRAMS:%=unittest/%)