makefiles: move all unit tests under make check-units

Isolate unit tests under their own make directive.
This commit is contained in:
lisa neigut 2019-06-20 13:13:14 -05:00 committed by Rusty Russell
parent 267d627521
commit 7046d0220c
12 changed files with 15 additions and 12 deletions

View file

@ -244,7 +244,9 @@ else
PYTEST_OPTS += -x
endif
check:
check-units:
check: check-units
$(MAKE) installcheck
$(MAKE) pytest

View file

@ -14,4 +14,4 @@ ALL_OBJS += $(BITCOIN_TEST_PROGRAMS:=.o)
bitcoin/test/run-secret_eq_consttime.o: CFLAGS += -DCOPTFLAGS="\"${COPTFLAGS}\""
update-mocks: $(BITCOIN_TEST_SRC:%=update-mocks/%)
check: $(BITCOIN_TEST_PROGRAMS:%=unittest/%)
check-units: $(BITCOIN_TEST_PROGRAMS:%=unittest/%)

View file

@ -27,4 +27,4 @@ $(CHANNELD_TEST_PROGRAMS): $(CCAN_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(CHANNELD_
$(CHANNELD_TEST_OBJS): $(LIGHTNING_CHANNELD_HEADERS) $(LIGHTNING_CHANNELD_SRC)
check: $(CHANNELD_TEST_PROGRAMS:%=unittest/%)
check-units: $(CHANNELD_TEST_PROGRAMS:%=unittest/%)

View file

@ -25,4 +25,4 @@ $(CLI_TEST_PROGRAMS): $(CCAN_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(CLI_TEST_COMMO
$(CLI_TEST_OBJS): $(LIGHTNING_CLI_HEADERS) $(LIGHTNING_CLI_SRC)
check: $(CLI_TEST_PROGRAMS:%=unittest/%)
check-units: $(CLI_TEST_PROGRAMS:%=unittest/%)

View file

@ -13,4 +13,4 @@ ALL_OBJS += $(COMMON_TEST_PROGRAMS:=.o)
update-mocks: $(COMMON_TEST_SRC:%=update-mocks/%)
check: $(COMMON_TEST_PROGRAMS:%=unittest/%)
check-units: $(COMMON_TEST_PROGRAMS:%=unittest/%)

View file

@ -1,4 +1,4 @@
check: connectd-tests
check-units: connectd-tests
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
# That allows for unit testing of statics, and special effects.

View file

@ -190,7 +190,8 @@ There are three kinds of tests:
header order, and checks formatted quotes from BOLTs if BOLTDIR
exists.
* **unit tests** - standalone programs that can be run individually.
* **unit tests** - standalone programs that can be run individually. You can
also run all of the unit tests with `make check-units`.
They are `run-*.c` files in test/ subdirectories used to test routines
inside C source files.

View file

@ -1,4 +1,4 @@
check: gossipd-tests
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.

View file

@ -29,4 +29,4 @@ $(LIGHTNINGD_TEST_PROGRAMS): $(CCAN_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(LIGHTNI
$(LIGHTNINGD_TEST_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_SRC)
check: $(LIGHTNINGD_TEST_PROGRAMS:%=unittest/%)
check-units: $(LIGHTNINGD_TEST_PROGRAMS:%=unittest/%)

View file

@ -1,4 +1,4 @@
check: onchaind-tests
check-units: onchaind-tests
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
# That allows for unit testing of statics, and special effects.

View file

@ -34,4 +34,4 @@ $(WALLET_TEST_OBJS): $(WALLET_SRC)
update-mocks: $(WALLET_TEST_SRC:%=update-mocks/%)
check: $(WALLET_TEST_PROGRAMS:%=unittest/%)
check-units: $(WALLET_TEST_PROGRAMS:%=unittest/%)

View file

@ -1,4 +1,4 @@
check: wire-tests
check-units: wire-tests
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
# That allows for unit testing of statics, and special effects.