2019-06-20 19:13:14 +01:00
|
|
|
check-units: gossipd-tests
|
2017-08-31 03:08:12 +01:00
|
|
|
|
|
|
|
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
|
|
|
|
# That allows for unit testing of statics, and special effects.
|
|
|
|
GOSSIPD_TEST_SRC := $(wildcard gossipd/test/run-*.c)
|
|
|
|
GOSSIPD_TEST_OBJS := $(GOSSIPD_TEST_SRC:.c=.o)
|
|
|
|
GOSSIPD_TEST_PROGRAMS := $(GOSSIPD_TEST_OBJS:.o=)
|
|
|
|
|
|
|
|
GOSSIPD_TEST_COMMON_OBJS := \
|
2019-02-21 03:45:55 +00:00
|
|
|
common/amount.o \
|
2021-09-21 08:23:10 +01:00
|
|
|
common/autodata.o \
|
2019-08-09 17:12:01 +01:00
|
|
|
common/bigsize.o \
|
2020-05-19 21:46:30 +01:00
|
|
|
common/channel_id.o \
|
2018-01-12 14:10:21 +00:00
|
|
|
common/features.o \
|
2019-04-08 10:58:32 +01:00
|
|
|
common/node_id.o \
|
2019-08-09 17:12:01 +01:00
|
|
|
common/json.o \
|
|
|
|
common/json_helpers.o \
|
2021-07-02 22:00:17 +01:00
|
|
|
common/lease_rates.o \
|
2017-08-31 03:08:12 +01:00
|
|
|
common/pseudorand.o \
|
2020-12-02 00:10:04 +00:00
|
|
|
common/setup.o \
|
2017-08-31 03:08:12 +01:00
|
|
|
common/type_to_string.o \
|
2019-08-09 17:12:01 +01:00
|
|
|
common/utils.o \
|
2021-05-22 06:00:22 +01:00
|
|
|
gossipd/gossip_store_wiregen.o \
|
2020-09-07 22:06:50 +01:00
|
|
|
wire/peer$(EXP)_wiregen.o \
|
2019-08-09 17:12:01 +01:00
|
|
|
wire/fromwire.o \
|
2020-12-03 09:34:03 +00:00
|
|
|
wire/tlvstream.o \
|
2019-08-09 17:12:01 +01:00
|
|
|
wire/towire.o
|
2017-08-31 03:08:12 +01:00
|
|
|
|
2020-08-31 02:13:25 +01:00
|
|
|
ALL_C_SOURCES += $(GOSSIPD_TEST_SRC)
|
|
|
|
ALL_TEST_PROGRAMS += $(GOSSIPD_TEST_PROGRAMS)
|
|
|
|
|
2017-08-31 03:08:12 +01:00
|
|
|
$(GOSSIPD_TEST_PROGRAMS): $(GOSSIPD_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
|
|
|
|
|
2017-11-21 02:58:17 +00:00
|
|
|
# Test objects depend on ../ src and headers.
|
2020-08-31 02:13:25 +01:00
|
|
|
$(GOSSIPD_TEST_OBJS): $(GOSSIPD_HEADERS) $(GOSSIPD_SRC)
|
2017-08-31 03:08:12 +01:00
|
|
|
|
|
|
|
gossipd-tests: $(GOSSIPD_TEST_PROGRAMS:%=unittest/%)
|
|
|
|
|