2021-04-23 00:53:28 +02:00
|
|
|
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
|
|
|
|
# That allows for unit testing of statics, and special effects.
|
|
|
|
PLUGIN_TEST_SRC := $(wildcard plugins/test/run-*.c)
|
|
|
|
PLUGIN_TEST_OBJS := $(PLUGIN_TEST_SRC:.c=.o)
|
|
|
|
PLUGIN_TEST_PROGRAMS := $(PLUGIN_TEST_OBJS:.o=)
|
|
|
|
|
2021-05-27 06:25:58 +02:00
|
|
|
ALL_C_SOURCES += $(PLUGIN_TEST_SRC)
|
2021-04-23 00:53:28 +02:00
|
|
|
ALL_TEST_PROGRAMS += $(PLUGIN_TEST_PROGRAMS)
|
|
|
|
|
|
|
|
PLUGIN_TEST_COMMON_OBJS := \
|
|
|
|
common/amount.o \
|
2021-09-21 09:23:10 +02:00
|
|
|
common/autodata.o \
|
2021-04-23 00:53:28 +02:00
|
|
|
common/pseudorand.o \
|
|
|
|
common/setup.o \
|
|
|
|
common/type_to_string.o \
|
|
|
|
common/utils.o
|
|
|
|
|
2021-05-22 07:00:15 +02:00
|
|
|
plugins/test/run-route-overlong: \
|
|
|
|
common/dijkstra.o \
|
|
|
|
common/fp16.o \
|
|
|
|
common/gossmap.o \
|
|
|
|
common/node_id.o \
|
|
|
|
common/route.o
|
|
|
|
|
2022-07-16 06:55:09 +02:00
|
|
|
$(PLUGIN_TEST_PROGRAMS): $(BITCOIN_OBJS) $(WIRE_OBJS) $(PLUGIN_TEST_COMMON_OBJS)
|
2021-04-23 00:53:28 +02:00
|
|
|
|
|
|
|
$(PLUGIN_TEST_OBJS): $(PLUGIN_FUNDER_HEADER) $(PLUGIN_FUNDER_SRC)
|
|
|
|
|
|
|
|
check-units: $(PLUGIN_TEST_PROGRAMS:%=unittest/%)
|