]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
make the tests depend on the module being tested
authorAlan T. DeKok <aland@freeradius.org>
Mon, 14 Dec 2020 22:37:51 +0000 (17:37 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 14 Dec 2020 22:38:14 +0000 (17:38 -0500)
src/tests/modules/all.mk

index 7b9bbea65c81356312ef4ccce6779181a17820cd..f022a0e167a629962c4cda253a94edcf3a4a9aa6 100644 (file)
@@ -65,6 +65,14 @@ $(foreach x,$(FILES),$(eval $(call MODULE_FILTER,$(firstword $(subst /, ,$x)),$x
 FILES := $(filter-out $(FILES_SKIP),$(FILES))
 $(eval $(call TEST_BOOTSTRAP))
 
+#
+#  For each output file, find the rlm_*.la module which it needs,
+#  and make the output file depend on the library.  That way if the
+#  module is re-built, then the tests are re-run.
+#
+$(foreach x, $(FILES), $(eval $$(OUTPUT.$(TEST))/$x: $(patsubst %,$(BUILD_DIR)/lib/rlm_%.la,$(patsubst %/,%,$(dir $x)))))
+
+
 #
 #  Files in the output dir depend on the unit tests
 #