mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
ee25547576
Two changes: - Fixed the function signature of noleak_ to match in both configurations - Added memleak.o to linker for tests Generating the stubs for the unit tests doesn't really work since the stubs are checked in an differ between the two configurations, so adding memleak to the linker fixes that, by not requiring stubs to be generated in the first place. Signed-off-by: Christian Decker <decker.christian@gmail.com>
29 lines
845 B
Makefile
29 lines
845 B
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/htlc_state.o \
|
|
common/type_to_string.o \
|
|
common/memleak.o \
|
|
common/pseudorand.o \
|
|
common/utils.o \
|
|
lightningd/htlc_end.o \
|
|
lightningd/log.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/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: $(WALLET_TEST_PROGRAMS:%=unittest/%)
|