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 \
|
2019-08-09 18:12:01 +02:00
|
|
|
common/bigsize.o \
|
2020-05-19 22:46:30 +02:00
|
|
|
common/channel_id.o \
|
2018-01-12 15:10:21 +01:00
|
|
|
common/features.o \
|
2019-04-08 11:58:32 +02:00
|
|
|
common/node_id.o \
|
2019-08-09 18:12:01 +02:00
|
|
|
common/json.o \
|
|
|
|
common/json_helpers.o \
|
2017-08-31 04:08:12 +02:00
|
|
|
common/pseudorand.o \
|
|
|
|
common/type_to_string.o \
|
2019-08-09 18:12:01 +02:00
|
|
|
common/utils.o \
|
|
|
|
wire/gen_peer_wire.o \
|
|
|
|
wire/fromwire.o \
|
|
|
|
wire/towire.o
|
2017-08-31 04:08:12 +02:00
|
|
|
|
|
|
|
update-mocks: $(GOSSIPD_TEST_SRC:%=update-mocks/%)
|
|
|
|
|
|
|
|
$(GOSSIPD_TEST_PROGRAMS): $(GOSSIPD_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
|
|
|
|
|
2017-11-21 03:58:17 +01:00
|
|
|
# Test objects depend on ../ src and headers.
|
|
|
|
$(GOSSIPD_TEST_OBJS): $(LIGHTNINGD_GOSSIP_HEADERS) $(LIGHTNINGD_GOSSIP_SRC)
|
2017-08-31 04:08:12 +02:00
|
|
|
|
|
|
|
ALL_OBJS += $(GOSSIPD_TEST_OBJS)
|
|
|
|
ALL_TEST_PROGRAMS += $(GOSSIPD_TEST_PROGRAMS)
|
|
|
|
|
|
|
|
gossipd-tests: $(GOSSIPD_TEST_PROGRAMS:%=unittest/%)
|
|
|
|
|