From: Alan T. DeKok Date: Wed, 26 Jan 2022 19:36:19 +0000 (-0500) Subject: add target-specific rules, and a "help" line X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6c4cdb2d72803bc85d6836d0811ca52d31b0e82;p=thirdparty%2Ffreeradius-server.git add target-specific rules, and a "help" line --- diff --git a/src/tests/bin/all.mk b/src/tests/bin/all.mk index 0509ea97e0..ac1fb34d6e 100644 --- a/src/tests/bin/all.mk +++ b/src/tests/bin/all.mk @@ -29,7 +29,7 @@ FILES := \ # # Add in all of the binary tests # -FILES += $(filter %_tests,$(ALL_TGTS))) +FILES += $(filter %_tests,$(ALL_TGTS)) $(eval $(call TEST_BOOTSTRAP)) @@ -60,3 +60,16 @@ $(BUILD_DIR)/tests/bin/%: $(BUILD_DIR)/bin/local/% exit 1; \ fi ${Q}touch $@ + +# +# Ensure that the protocol tests are run if any of the protocol dictionaries change +# +define UNIT_TEST_BIN +test.bin.$(subst _tests,,${1}): $(addprefix $(BUILD_DIR)/tests/bin/,${1}) + +test.bin.help: TEST_BIN_HELP += test.bin.$(subst _tests,,${1}) +endef +$(foreach x,$(FILES),$(eval $(call UNIT_TEST_BIN,$x))) + +test.bin.help: + @echo make $(TEST_BIN_HELP)