2019-06-20 13:13:14 -05:00
|
|
|
check-units: wire-tests
|
2016-11-30 06:21:50 +10:30
|
|
|
|
|
|
|
# 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 10:43:25 +09:30
|
|
|
ALL_C_SOURCES += $(WIRE_TEST_SRC)
|
|
|
|
ALL_TEST_PROGRAMS += $(WIRE_TEST_PROGRAMS)
|
|
|
|
|
2017-08-29 01:43:01 +09:30
|
|
|
WIRE_TEST_COMMON_OBJS := \
|
2020-12-02 10:40:04 +10:30
|
|
|
common/setup.o \
|
2017-08-29 01:43:01 +09:30
|
|
|
common/utils.o
|
|
|
|
|
2016-11-30 06:21:50 +10:30
|
|
|
update-mocks: $(WIRE_TEST_SRC:%=update-mocks/%)
|
|
|
|
|
2020-05-16 10:59:05 +09:30
|
|
|
# run-tlvstream.c needs to reach into bitcoin/pubkey for SUPERVERBOSE
|
|
|
|
$(WIRE_TEST_PROGRAMS): $(WIRE_TEST_COMMON_OBJS) $(filter-out bitcoin/pubkey.o,$(BITCOIN_OBJS))
|
2017-08-29 01:43:01 +09:30
|
|
|
|
2020-08-31 10:43:25 +09:30
|
|
|
$(WIRE_TEST_OBJS): $(WIRE_HEADERS) $(WIRE_SRC) $(WIRE_PRINT_SRC)
|
2016-11-30 06:21:50 +10:30
|
|
|
|
|
|
|
wire-tests: $(WIRE_TEST_PROGRAMS:%=unittest/%)
|
|
|
|
|
2020-09-08 06:36:50 +09:30
|
|
|
wire/test/run-peer-wire: wire/peer$(EXP)_wiregen.o common/bigsize.o
|