core-lightning/gossipd/test/Makefile
Rusty Russell 401f1debc5 common: clean up json routine locations.
We have them split over common/param.c, common/json.c,
common/json_helpers.c, common/json_tok.c and common/json_stream.c.

Change that to:
* common/json_parse (all the json_to_xxx routines)
* common/json_parse_simple (simplest the json parsing routines, for cli too)
* common/json_stream (all the json_add_xxx routines)
* common/json_param (all the param and param_xxx routines)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-07-15 12:24:00 -05:00

58 lines
1.5 KiB
Makefile

check-units: gossipd-tests
# 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 := \
common/amount.o \
common/autodata.o \
common/base32.o \
common/coin_mvt.o \
common/bigsize.o \
common/blindedpath.o \
common/channel_id.o \
common/features.o \
common/hmac.o \
common/node_id.o \
common/lease_rates.o \
common/onion.o \
common/pseudorand.o \
common/setup.o \
common/sphinx.o \
common/type_to_string.o \
common/utils.o \
common/wireaddr.o \
gossipd/gossip_store_wiregen.o \
wire/peer$(EXP)_wiregen.o \
wire/onion$(EXP)_wiregen.o \
wire/fromwire.o \
wire/tlvstream.o \
wire/towire.o
ALL_C_SOURCES += $(GOSSIPD_TEST_SRC)
ALL_TEST_PROGRAMS += $(GOSSIPD_TEST_PROGRAMS)
# Extra stuff needed for onion tests
gossipd/test/run-onion_message: \
wire/onion$(EXP)_wiregen.o \
common/blindedpath.o \
common/blinding.o \
common/hmac.o \
common/onion.o \
common/sphinx.o \
# JSON needed for this test
gossipd/test/run-extended-info: \
common/json_parse.o \
common/json_parse_simple.o
$(GOSSIPD_TEST_PROGRAMS): $(GOSSIPD_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
# Test objects depend on ../ src and headers.
$(GOSSIPD_TEST_OBJS): $(GOSSIPD_HEADERS) $(GOSSIPD_SRC)
gossipd-tests: $(GOSSIPD_TEST_PROGRAMS:%=unittest/%)