Skip to content

Commit

Permalink
more simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Mar 11, 2019
1 parent 7fa6950 commit 1fa3e19
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -79,7 +79,8 @@ $(BUILD_DIR)/tests/radiusd-c: raddb/test.conf ${BUILD_DIR}/bin/radiusd $(GENERAT
test: ${BUILD_DIR}/bin/radiusd ${BUILD_DIR}/bin/radclient tests.bin tests.trie tests.unit tests.xlat tests.keywords tests.auth tests.modules $(BUILD_DIR)/tests/radiusd-c tests.eap | build.raddb
@$(MAKE) -C src/tests tests

clean.test: clean.tests.keywords clean.tests.trie clean.tests.map clean.tests.xlat clean.tests.dict clean.tests.eap clean.tests.auth clean.tests.modules clean.tests.bin
.PHONY: clean.test
clean.test: clean.tests.modules
@$(MAKE) -C src/tests clean

# Tests specifically for Travis. We do a LOT more than just
Expand Down
4 changes: 2 additions & 2 deletions src/tests/auth/all.mk
Expand Up @@ -112,8 +112,8 @@ TESTS.AUTH_FILES := $(addprefix $(BUILD_DIR)/tests/auth/,$(AUTH_FILES))
#
tests.auth: $(TESTS.AUTH_FILES)

$(TESTS.AUTH_FILES): $(TESTS.KEYWORDS_FILES)

.PHONY: clean.tests.auth
clean.tests.auth:
${Q}rm -rf $(BUILD_DIR)/tests/auth/

clean.test: clean.tests.auth
1 change: 1 addition & 0 deletions src/tests/bin/all.mk
Expand Up @@ -51,3 +51,4 @@ tests.bin: $(TESTS.BIN_FILES)
clean.tests.bin:
${Q}rm -rf $(BUILD_DIR)/tests/bin/

clean.test: clean.tests.bin
2 changes: 2 additions & 0 deletions src/tests/dict/all.mk
Expand Up @@ -50,6 +50,8 @@ $(TEST): $(BUILD_DIR)/tests/$(TEST)
clean.$(TEST):
${Q}rm -rf $(BUILD_DIR)/src/tests/dict $(BUILD_DIR)/tests/tests.dict

clean.test: clean.$(TEST)

# And the actual script to run each test.
#
# The parser expects to read "foo/dictionary", so we make a
Expand Down
6 changes: 3 additions & 3 deletions src/tests/eapol_test/all.mk
Expand Up @@ -47,9 +47,6 @@ $(CONFIG_PATH)/methods-enabled:
$(CONFIG_PATH)/methods-enabled/%: $(BUILD_DIR)/lib/rlm_eap_%.la | $(CONFIG_PATH)/methods-enabled
${Q}ln -sf $(CONFIG_PATH)/methods-available/$(notdir $@) $(CONFIG_PATH)/methods-enabled/

.PHONY: eap clean clean.tests.eap
clean: clean.tests.eap

#
# Only run EAP tests if we have a "test" target
#
Expand Down Expand Up @@ -80,11 +77,14 @@ radiusd.kill: | $(OUTPUT_DIR)
exit $$ret; \
fi

.PHONY: clean.tests.eap
clean.tests.eap:
${Q}rm -f $(OUTPUT_DIR)/*.ok $(OUTPUT_DIR)/*.log $(OUTPUT_DIR)/eapol_test.skip
${Q}rm -f "$(CONFIG_PATH)/test.conf"
${Q}rm -rf "$(CONFIG_PATH)/methods-enabled"

clean.test: clean.tests.eap

ifneq "$(EAPOL_TEST)" ""
$(CONFIG_PATH)/dictionary:
${Q}echo "# test dictionary not install. Delete at any time." > $@
Expand Down
1 change: 1 addition & 0 deletions src/tests/map/all.mk
Expand Up @@ -53,3 +53,4 @@ tests.map: $(MAP_OUTPUT)
clean.tests.map:
${Q}rm -rf $(BUILD_DIR)/tests/map/

clean.test: clean.tests.map
2 changes: 2 additions & 0 deletions src/tests/trie/test.mk
Expand Up @@ -34,3 +34,5 @@ $(TESTS.TRIE_FILES): $(TESTS.UNIT_FILES)
.PHONY: clean.tests.trie
clean.tests.trie:
${Q}rm -rf $(BUILD_DIR)/tests/trie/

clean.test: clean.tests.trie
2 changes: 2 additions & 0 deletions src/tests/unit/all.mk
Expand Up @@ -82,6 +82,8 @@ $(TEST): $(BUILD_DIR)/tests/$(TEST)
clean.$(TEST):
${Q}rm -rf $(BUILD_DIR)/src/tests/unit $(BUILD_DIR)/tests/tests.unit

clean.test: clean.$(TEST)

#
# And the actual script to run each test.
#
Expand Down
2 changes: 2 additions & 0 deletions src/tests/xlat/all.mk
Expand Up @@ -57,6 +57,8 @@ $(TEST): $(BUILD_DIR)/tests/$(TEST)
clean.$(TEST):
${Q}rm -rf $(BUILD_DIR)/src/tests/xlat $(BUILD_DIR)/tests/tests.xlat

clean.test: clean.$(TEST)

#
# And the actual script to run each test.
#
Expand Down

0 comments on commit 1fa3e19

Please sign in to comment.