2019-06-20 20:13:14 +02:00
|
|
|
check-units: wire-tests
|
2016-11-29 20:51:50 +01:00
|
|
|
|
|
|
|
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
|
|
|
|
# That allows for unit testing of statics, and special effects.
|
|
|
|
WIRE_TEST_SRC := $(wildcard wire/test/run-*.c)
|
|
|
|
WIRE_TEST_OBJS := $(WIRE_TEST_SRC:.c=.o)
|
|
|
|
WIRE_TEST_PROGRAMS := $(WIRE_TEST_OBJS:.o=)
|
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
ALL_C_SOURCES += $(WIRE_TEST_SRC)
|
|
|
|
ALL_TEST_PROGRAMS += $(WIRE_TEST_PROGRAMS)
|
|
|
|
|
2017-08-28 18:13:01 +02:00
|
|
|
WIRE_TEST_COMMON_OBJS := \
|
2021-09-21 09:23:10 +02:00
|
|
|
common/autodata.o \
|
2020-12-10 20:52:29 +01:00
|
|
|
common/pseudorand.o \
|
2020-12-02 01:10:04 +01:00
|
|
|
common/setup.o \
|
2017-08-28 18:13:01 +02:00
|
|
|
common/utils.o
|
|
|
|
|
2020-05-16 03:29:05 +02:00
|
|
|
# run-tlvstream.c needs to reach into bitcoin/pubkey for SUPERVERBOSE
|
2021-12-04 12:25:06 +01:00
|
|
|
$(WIRE_TEST_PROGRAMS): $(WIRE_TEST_COMMON_OBJS) $(filter-out bitcoin/pubkey.o bitcoin/chainparams.o,$(BITCOIN_OBJS))
|
2017-08-28 18:13:01 +02:00
|
|
|
|
2021-06-03 05:29:47 +02:00
|
|
|
# We put a dependency on non-exp sources here, so they get built even if
|
|
|
|
# we're EXPERIMENTAL_FEATURES.
|
|
|
|
$(WIRE_TEST_OBJS): $(WIRE_HEADERS) $(WIRE_SRC) $(WIRE_PRINT_SRC) $(WIRE_NONEXP_SRC)
|
2016-11-29 20:51:50 +01:00
|
|
|
|
|
|
|
wire-tests: $(WIRE_TEST_PROGRAMS:%=unittest/%)
|
|
|
|
|
2020-09-07 23:06:50 +02:00
|
|
|
wire/test/run-peer-wire: wire/peer$(EXP)_wiregen.o common/bigsize.o
|