diff --git a/Makefile b/Makefile index 22152da88..b8e810978 100644 --- a/Makefile +++ b/Makefile @@ -244,7 +244,9 @@ else PYTEST_OPTS += -x endif -check: +check-units: + +check: check-units $(MAKE) installcheck $(MAKE) pytest diff --git a/bitcoin/test/Makefile b/bitcoin/test/Makefile index b16cd4837..5e8e5ba54 100644 --- a/bitcoin/test/Makefile +++ b/bitcoin/test/Makefile @@ -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/%) diff --git a/channeld/test/Makefile b/channeld/test/Makefile index f197c070d..ca74b9042 100644 --- a/channeld/test/Makefile +++ b/channeld/test/Makefile @@ -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/%) diff --git a/cli/test/Makefile b/cli/test/Makefile index 2f5889f63..eed5da394 100644 --- a/cli/test/Makefile +++ b/cli/test/Makefile @@ -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/%) diff --git a/common/test/Makefile b/common/test/Makefile index 8cc31f91b..59e2a6415 100644 --- a/common/test/Makefile +++ b/common/test/Makefile @@ -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/%) diff --git a/connectd/test/Makefile b/connectd/test/Makefile index 6cf654dcd..765c1d7e8 100644 --- a/connectd/test/Makefile +++ b/connectd/test/Makefile @@ -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. diff --git a/doc/HACKING.md b/doc/HACKING.md index 0e551789e..e7351e667 100644 --- a/doc/HACKING.md +++ b/doc/HACKING.md @@ -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. diff --git a/gossipd/test/Makefile b/gossipd/test/Makefile index 09a6e9bb7..dfe1e32f6 100644 --- a/gossipd/test/Makefile +++ b/gossipd/test/Makefile @@ -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. diff --git a/lightningd/test/Makefile b/lightningd/test/Makefile index b0334987a..bc415583d 100644 --- a/lightningd/test/Makefile +++ b/lightningd/test/Makefile @@ -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/%) diff --git a/onchaind/test/Makefile b/onchaind/test/Makefile index c487946df..7d29d5250 100644 --- a/onchaind/test/Makefile +++ b/onchaind/test/Makefile @@ -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. diff --git a/wallet/test/Makefile b/wallet/test/Makefile index 03b05ce21..ddeb9ddfd 100644 --- a/wallet/test/Makefile +++ b/wallet/test/Makefile @@ -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/%) diff --git a/wire/test/Makefile b/wire/test/Makefile index dcbf115e8..f086ac1b7 100644 --- a/wire/test/Makefile +++ b/wire/test/Makefile @@ -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.