From: Nick Porter Date: Wed, 13 Apr 2022 09:25:02 +0000 (+0100) Subject: Define test.ldap_sync to run tests for all types of directory X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bf091a36bdcd3dd8a1d0f35893661f38a6e8771;p=thirdparty%2Ffreeradius-server.git Define test.ldap_sync to run tests for all types of directory --- diff --git a/src/tests/ldap_sync/all.mk b/src/tests/ldap_sync/all.mk new file mode 100644 index 00000000000..c795a6f3864 --- /dev/null +++ b/src/tests/ldap_sync/all.mk @@ -0,0 +1,34 @@ +# +# +# +TEST := test.ldap_sync + +# +# Find all the LDAP syncs for which we have a configured server +# +FILES := $(subst $(DIR)/,,$(wildcard $(DIR)/*/all.mk)) + +define LDAP_FILTER +ifeq "$($(shell echo ${1} | tr a-z A-Z)_TEST_SERVER)" "" + FILES_SKIP += ${2} +endif +endef + +$(foreach x,$(FILES),$(eval $(call LDAP_FILTER,$(firstword $(subst /, ,$x)),$x))) +FILES := $(filter-out $(FILES_SKIP),$(FILES)) + +# +# Include the make file for each type of LDAP sync with a test server +# +SUBMAKEFILES := $(FILES) + +# +# Define target to run all ldap_sync tests +# +$(TEST): test.ldap_sync.dir $(patsubst %/all.mk,test.ldap_sync/%,$(FILES)) + +# +# Ensure diretory for "touch" files exists +# +test.ldap_sync.dir: + ${Q}mkdir -p $(BUILD_DIR)/tests/test.ldap_sync