2019-06-20 20:13:14 +02:00
|
|
|
check-units: gossipd-tests
|
2017-08-31 04:08:12 +02: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 04:45:55 +01:00
|
|
|
common/amount.o \
|
2021-09-21 09:23:10 +02:00
|
|
|
common/autodata.o \
|
2022-02-23 19:11:03 +01:00
|
|
|
common/base32.o \
|
2022-02-16 22:36:47 +01:00
|
|
|
common/coin_mvt.o \
|
2019-08-09 18:12:01 +02:00
|
|
|
common/bigsize.o \
|
2021-11-30 04:06:05 +01:00
|
|
|
common/blindedpath.o \
|
2020-05-19 22:46:30 +02:00
|
|
|
common/channel_id.o \
|
2018-01-12 15:10:21 +01:00
|
|
|
common/features.o \
|
2021-11-30 04:06:05 +01:00
|
|
|
common/hmac.o \
|
2019-04-08 11:58:32 +02:00
|
|
|
common/node_id.o \
|
2021-07-02 23:00:17 +02:00
|
|
|
common/lease_rates.o \
|
2021-11-30 04:06:05 +01:00
|
|
|
common/onion.o \
|
2017-08-31 04:08:12 +02:00
|
|
|
common/pseudorand.o \
|
2020-12-02 01:10:04 +01:00
|
|
|
common/setup.o \
|
2021-11-30 04:06:05 +01:00
|
|
|
common/sphinx.o \
|
2017-08-31 04:08:12 +02:00
|
|
|
common/type_to_string.o \
|
2019-08-09 18:12:01 +02:00
|
|
|
common/utils.o \
|
2022-02-23 19:11:03 +01:00
|
|
|
common/wireaddr.o \
|
2021-05-22 07:00:22 +02:00
|
|
|
gossipd/gossip_store_wiregen.o \
|
2020-09-07 23:06:50 +02:00
|
|
|
wire/peer$(EXP)_wiregen.o \
|
2021-11-30 04:06:05 +01:00
|
|
|
wire/onion$(EXP)_wiregen.o \
|
2019-08-09 18:12:01 +02:00
|
|
|
wire/fromwire.o \
|
2020-12-03 10:34:03 +01:00
|
|
|
wire/tlvstream.o \
|
2019-08-09 18:12:01 +02:00
|
|
|
wire/towire.o
|
2017-08-31 04:08:12 +02:00
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
ALL_C_SOURCES += $(GOSSIPD_TEST_SRC)
|
|
|
|
ALL_TEST_PROGRAMS += $(GOSSIPD_TEST_PROGRAMS)
|
|
|
|
|
2021-11-30 04:06:05 +01:00
|
|
|
# Extra stuff needed for onion tests
|
|
|
|
gossipd/test/run-onion_message: \
|
|
|
|
wire/onion$(EXP)_wiregen.o \
|
|
|
|
common/blindedpath.o \
|
|
|
|
common/blinding.o \
|
|
|
|
common/hmac.o \
|
|
|
|
common/onion.o \
|
|
|
|
common/sphinx.o \
|
|
|
|
|
2022-07-04 05:49:38 +02:00
|
|
|
# JSON needed for this test
|
|
|
|
gossipd/test/run-extended-info: \
|
|
|
|
common/json_parse.o \
|
|
|
|
common/json_parse_simple.o
|
2021-11-30 04:06:05 +01:00
|
|
|
|
2017-08-31 04:08:12 +02:00
|
|
|
$(GOSSIPD_TEST_PROGRAMS): $(GOSSIPD_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
|
|
|
|
|
2017-11-21 03:58:17 +01:00
|
|
|
# Test objects depend on ../ src and headers.
|
2020-08-31 03:13:25 +02:00
|
|
|
$(GOSSIPD_TEST_OBJS): $(GOSSIPD_HEADERS) $(GOSSIPD_SRC)
|
2017-08-31 04:08:12 +02:00
|
|
|
|
|
|
|
gossipd-tests: $(GOSSIPD_TEST_PROGRAMS:%=unittest/%)
|