mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 10:39:49 +01:00
c403415caa
My test case is a mainnet gossip store with 22107 channels, and time to do `lightning-cli listchannels`: Before: `lightning-cli listchannels` DEVELOPER=0 real 0m1.303000-1.324000(1.3114+/-0.0091)s After: real 0m0.629000-0.695000(0.64985+/-0.019)s Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
30 lines
987 B
Makefile
30 lines
987 B
Makefile
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
|
|
# That allows for unit testing of statics, and special effects.
|
|
LIGHTNINGD_TEST_SRC := $(wildcard lightningd/test/run-*.c)
|
|
LIGHTNINGD_TEST_OBJS := $(LIGHTNINGD_TEST_SRC:.c=.o)
|
|
LIGHTNINGD_TEST_PROGRAMS := $(LIGHTNINGD_TEST_OBJS:.o=)
|
|
|
|
ALL_TEST_PROGRAMS += $(LIGHTNINGD_TEST_PROGRAMS)
|
|
ALL_OBJS += $(LIGHTNINGD_TEST_OBJS)
|
|
|
|
LIGHTNINGD_TEST_COMMON_OBJS := \
|
|
common/bech32.o \
|
|
common/daemon_conn.o \
|
|
common/htlc_state.o \
|
|
common/io_lock.o \
|
|
common/json.o \
|
|
common/pseudorand.o \
|
|
common/memleak.o \
|
|
common/msg_queue.o \
|
|
common/utils.o \
|
|
common/type_to_string.o \
|
|
common/permute_tx.o
|
|
|
|
update-mocks: $(LIGHTNINGD_TEST_SRC:%=update-mocks/%)
|
|
|
|
$(LIGHTNINGD_TEST_PROGRAMS): $(CCAN_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(LIBBASE58_OBJS) $(LIGHTNINGD_TEST_COMMON_OBJS)
|
|
|
|
$(LIGHTNINGD_TEST_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_SRC)
|
|
|
|
check: $(LIGHTNINGD_TEST_PROGRAMS:%=unittest/%)
|