2017-11-01 02:58:25 +01:00
|
|
|
COMMON_TEST_SRC := $(wildcard common/test/run-*.c)
|
2020-09-09 12:10:29 +02:00
|
|
|
|
|
|
|
ifeq ($(EXPERIMENTAL_FEATURES),1)
|
|
|
|
COMMON_TEST_SRC += $(wildcard common/test/exp-run-*.c)
|
|
|
|
endif
|
|
|
|
|
2017-09-11 06:49:48 +02:00
|
|
|
COMMON_TEST_OBJS := $(COMMON_TEST_SRC:.c=.o)
|
|
|
|
COMMON_TEST_PROGRAMS := $(COMMON_TEST_OBJS:.o=)
|
2017-08-28 18:13:01 +02:00
|
|
|
|
|
|
|
COMMON_TEST_COMMON_OBJS := \
|
2020-05-16 00:13:22 +02:00
|
|
|
common/setup.o \
|
2017-08-28 18:13:01 +02:00
|
|
|
common/utils.o
|
|
|
|
|
2017-09-11 06:49:48 +02:00
|
|
|
$(COMMON_TEST_PROGRAMS): $(COMMON_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
|
2017-11-24 05:12:55 +01:00
|
|
|
$(COMMON_TEST_OBJS): $(COMMON_HEADERS) $(WIRE_HEADERS) $(COMMON_SRC)
|
2017-08-28 18:13:01 +02:00
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
ALL_C_SOURCES += $(COMMON_TEST_SRC)
|
2017-08-28 18:13:01 +02:00
|
|
|
ALL_TEST_PROGRAMS += $(COMMON_TEST_PROGRAMS)
|
|
|
|
|
2019-11-14 01:14:53 +01:00
|
|
|
# Sphinx test wants to decode TLVs.
|
2020-09-07 23:06:50 +02:00
|
|
|
common/test/run-sphinx: wire/onion$(EXP)_wiregen.o wire/towire.o wire/fromwire.o
|
2019-11-14 01:14:53 +01:00
|
|
|
|
2020-01-26 13:07:50 +01:00
|
|
|
common/test/run-param \
|
|
|
|
common/test/run-json: \
|
|
|
|
common/amount.o \
|
|
|
|
common/base32.o \
|
|
|
|
common/bigsize.o \
|
|
|
|
common/json.o \
|
|
|
|
common/json_stream.o \
|
|
|
|
common/wireaddr.o \
|
|
|
|
common/type_to_string.o \
|
|
|
|
wire/fromwire.o \
|
2020-09-07 23:06:50 +02:00
|
|
|
wire/onion$(EXP)_wiregen.o \
|
2020-01-26 13:07:50 +01:00
|
|
|
wire/towire.o
|
|
|
|
|
2021-05-21 07:21:05 +02:00
|
|
|
common/test/run-route common/test/run-route-specific: \
|
|
|
|
common/amount.o \
|
|
|
|
common/dijkstra.o \
|
|
|
|
common/fp16.o \
|
|
|
|
common/gossmap.o \
|
|
|
|
common/node_id.o \
|
|
|
|
common/pseudorand.o \
|
|
|
|
common/route.o \
|
|
|
|
wire/fromwire.o \
|
|
|
|
wire/peer$(EXP)_wiregen.o \
|
|
|
|
wire/towire.o
|
|
|
|
|
2021-05-22 07:00:22 +02:00
|
|
|
common/test/run-gossmap_local: \
|
|
|
|
wire/fromwire.o \
|
|
|
|
wire/peer$(EXP)_wiregen.o \
|
2021-06-10 19:54:08 +02:00
|
|
|
wire/tlvstream.o \
|
2021-05-22 07:00:22 +02:00
|
|
|
wire/towire.o
|
2021-05-21 07:21:05 +02:00
|
|
|
|
2021-07-05 13:26:39 +02:00
|
|
|
common/test/run-bolt12_merkle: \
|
|
|
|
common/amount.o \
|
|
|
|
common/bigsize.o \
|
|
|
|
common/bech32.o \
|
|
|
|
common/bech32_util.o \
|
|
|
|
common/bolt12.o \
|
|
|
|
common/node_id.o \
|
|
|
|
common/type_to_string.o \
|
|
|
|
wire/bolt12$(EXP)_wiregen.o \
|
|
|
|
wire/fromwire.o \
|
|
|
|
wire/tlvstream.o \
|
|
|
|
wire/peer$(EXP)_wiregen.o \
|
|
|
|
wire/towire.o
|
|
|
|
|
|
|
|
|
2019-06-20 20:13:14 +02:00
|
|
|
check-units: $(COMMON_TEST_PROGRAMS:%=unittest/%)
|