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=)
|
|
|
|
|
2017-08-29 01:43:01 +09:30
|
|
|
WIRE_TEST_COMMON_OBJS := \
|
|
|
|
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
|
|
|
|
|
|
|
# Test objects require source to be generated, since they include ..
|
2017-11-21 13:28:17 +10:30
|
|
|
$(WIRE_TEST_OBJS): $(WIRE_GEN_SRC) $(WIRE_SRC) $(WIRE_HEADERS)
|
2016-11-30 06:21:50 +10:30
|
|
|
|
2017-08-29 01:43:01 +09:30
|
|
|
ALL_OBJS += $(WIRE_TEST_OBJS)
|
|
|
|
ALL_TEST_PROGRAMS += $(WIRE_TEST_PROGRAMS)
|
2016-11-30 06:21:50 +10:30
|
|
|
|
|
|
|
wire-tests: $(WIRE_TEST_PROGRAMS:%=unittest/%)
|
|
|
|
|
2019-11-27 16:24:09 +01:00
|
|
|
wire/test/run-peer-wire: wire/gen_peer_wire.o common/bigsize.o
|