]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Abstract module dependencies
authorAlan T. DeKok <aland@freeradius.org>
Wed, 27 Nov 2013 16:25:27 +0000 (11:25 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 27 Nov 2013 16:25:27 +0000 (11:25 -0500)
So that we link the raddb config and the module.la before
running the tests

src/tests/keywords/all.mk

index 1f679d74fe3f9ed921fe9a3ca2133573a771a280..77fd6722d13a03f5cb82ab09ee3c56f0f043d5d4 100644 (file)
@@ -52,6 +52,10 @@ $(BUILD_DIR)/tests/keywords/%.attrs: $(DIR)/%.attrs | $(BUILD_DIR)/tests/keyword
 #
 .PRECIOUS: $(BUILD_DIR)/tests/keywords/%.attrs
 
+KEYWORD_MODULES := pap always expr
+KEYWORD_RADDB  := $(addprefix raddb/mods-enabled/,$(KEYWORD_MODULES))
+KEYWORD_LIBS   := $(addsuffix .la,$(addprefix rlm_,$(KEYWORD_MODULES)))
+
 #
 #  Files in the output dir depend on the unit tests
 #
@@ -68,7 +72,7 @@ $(BUILD_DIR)/tests/keywords/%.attrs: $(DIR)/%.attrs | $(BUILD_DIR)/tests/keyword
 #  Otherwise, check the log file for a parse error which matches the
 #  ERROR line in the input.
 #
-$(BUILD_DIR)/tests/keywords/%: $(DIR)/% build.raddb $(BUILD_DIR)/tests/keywords/%.attrs $(BUILD_DIR)/bin/local/unittest | $(BUILD_DIR)/tests/keywords raddb/mods-enabled/pap raddb/mods-enabled/always raddb/mods-enabled/expr
+$(BUILD_DIR)/tests/keywords/%: $(DIR)/% build.raddb $(BUILD_DIR)/tests/keywords/%.attrs $(BUILD_DIR)/bin/local/unittest | $(BUILD_DIR)/tests/keywords $(KEYWORD_RADDB) $(KEYWORD_LIBS)
        @echo UNIT-TEST $(notdir $@)
        @if ! KEYWORD=$(notdir $@) $(JLIBTOOL) --quiet --mode=execute ./$(BUILD_DIR)/bin/local/unittest -D share -d src/tests/keywords/ -i $@.attrs -f $@.attrs -xx > $@.log 2>&1; then \
                if ! grep ERROR $< 2>&1 > /dev/null; then \