]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add dependencies and clean rules
authorAlan T. DeKok <aland@freeradius.org>
Thu, 26 Nov 2020 17:18:36 +0000 (12:18 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 26 Nov 2020 17:25:31 +0000 (12:25 -0500)
so that the tests will be run when the code changes

src/tests/tacacs/all.mk

index c60d6884a03275e4f5bf593fff876d55fb432be7..97ad8bcf1b2b5762c4e4284af65ba567eb2791f9 100644 (file)
@@ -30,6 +30,7 @@ $(eval $(call TEST_BOOTSTRAP))
 TACACS_BUILD_DIR  := $(BUILD_DIR)/tests/tacacs
 TACACS_RADIUS_LOG := $(TACACS_BUILD_DIR)/radiusd.log
 TACACS_GDB_LOG    := $(TACACS_BUILD_DIR)/gdb.log
+TACACS_LIBS      := libfreeradius-tacacs.a proto_tacacs.a proto_tacacs_auth.a proto_tacacs_autz.a proto_tacacs_acct.a
 
 #
 #      Local TACACS+ client
@@ -45,7 +46,7 @@ $(eval $(call RADIUSD_SERVICE,radiusd,$(OUTPUT)))
 #
 #      Run the tacacs_client commands against the radiusd.
 #
-$(OUTPUT)/%: $(DIR)/% | $(TEST).radiusd_kill $(TEST).radiusd_start
+$(OUTPUT)/%: $(DIR)/% $(TACACS_LIBS) | $(TEST).radiusd_kill $(TEST).radiusd_start
        $(eval TARGET   := $(notdir $<))
        $(eval CMD_TEST := $(patsubst %.txt,%.cmd,$<))
        $(eval EXPECTED := $(patsubst %.txt,%.out,$<))
@@ -90,4 +91,8 @@ else
 test.tacacs:
        $(Q)echo "WARNING: 'tests.tacacs' requires 'tacacs_plus' Python3 module. e.g: pip3 install tacacs_plus"
        $(Q)echo "Skipping 'test.tacacs'"
+
+.PHONY: clean.test.tacacs
+clean.test.tacacs:
+       @rm -f $(TACACS_BUILD_DIR)/depends.mk
 endif