]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix EAP tests allowing 'make -C src/tests/ tests.eap'
authorJorge Pereira <jpereiran@gmail.com>
Fri, 2 Apr 2021 01:47:48 +0000 (22:47 -0300)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 2 Apr 2021 16:46:04 +0000 (12:46 -0400)
Even we should use the same 'eapol_test' binary among all systems. then,
just call the wrapper $(top_builddir)/scripts/ci/eapol_test-build.sh

src/tests/Makefile

index 88bcb74c9c1e41b959890645fde00ddb024161c5..de948cfe0e878e35a009835e2488158d7d14cd18 100644 (file)
@@ -37,7 +37,7 @@ else
 
 -include $(BUILD_PATH)/tests/eapol_test/eapol_test.mk
 ifeq "$(EAPOL_TEST)" ""
-EAPOL_TEST := $(shell which eapol_test)
+EAPOL_TEST := $(shell $(top_builddir)/scripts/ci/eapol_test-build.sh)
 endif
 
 endif # check for eapol_test
@@ -172,7 +172,7 @@ clean.tests.eap:
 #
 $(BUILD_PATH)/tests/eap/%.ok: NO_MPPE = $(filter eap-md5,$(basename $(notdir $@)))
 
-$(BUILD_PATH)/tests/eap/%.ok: $(top_builddir)/src/tests/%.conf | $(BUILD_PATH)/tests/eap
+$(BUILD_PATH)/tests/eap/%.ok: $(top_builddir)/src/tests/%.conf | radiusd.kill $(BUILD_PATH)/tests/eap radiusd.pid radiusd.kill
        @echo EAPOL_TEST $(notdir $(patsubst %.conf,%,$<))
        @if ! $(EAPOL_TEST) -c $< -p $(PORT) -s $(SECRET) $(if $(NO_MPPE),-n) > $(patsubst %.ok,%,$@).log 2>&1; then \
                echo "    " FAILED; \
@@ -216,7 +216,9 @@ endef
 $(foreach FILE,$(patsubst %.conf,%,$(EAP_TLS_FILES)),$(foreach TLS,$(EAP_TLS_VERSIONS),$(eval $(call EAP_TLS_CONFIG,${FILE},${TLS}))))
 endif # there's no "prefix", so we don't run the full EAP tests
 
-tests.eap: $(sort $(addprefix $(BUILD_PATH)/tests/eap/,$(patsubst %.conf,%.ok, $(notdir $(EAP_TLS_FILES) $(EAP_FILES)))) $(EAP_TLS_VERSION_FILES))
+EAPOL_OK_FILES := $(sort $(addprefix $(BUILD_PATH)/tests/eap/,$(patsubst %.conf,%.ok, $(notdir $(EAP_TLS_FILES) $(EAP_FILES)))) $(EAP_TLS_VERSION_FILES))
+
+tests.eap: $(EAPOL_OK_FILES) | radiusd.kill radiusd.pid
 
 endif # we have eapol_test built