From: Alan T. DeKok Date: Thu, 20 Jul 2023 17:48:40 +0000 (-0400) Subject: remove all tests we don't want, instead of using elsif X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=284c65269a09655fdbe17476d27ca5626c0f7adb;p=thirdparty%2Ffreeradius-server.git remove all tests we don't want, instead of using elsif --- diff --git a/src/tests/modules/all.mk b/src/tests/modules/all.mk index c84cd7f3f96..21cd71bda61 100644 --- a/src/tests/modules/all.mk +++ b/src/tests/modules/all.mk @@ -9,22 +9,21 @@ TEST := test.modules # at precursors. # FILES := $(patsubst $(DIR)/%.unlang,%,$(call FIND_FILES_SUFFIX,$(DIR),*.unlang)) +FILES_SKIP := # -# Remove things which are known to fail in CI. -# Or which are known to have long runtimes... -# -# Also don't run icmp tests on Linux, they require setcap, or root. +# Don't run icmp tests on Linux, they require setcap, or root. # @todo - on Linux, *check* for root, or use "getcap" to see if the # unit_test_module binary has the correct permissions. # -ifeq "$(TRAVIS)" "1" - FILES_SKIP := $(filter icmp/%,$(FILES)) - -else ifeq "$(findstring apple,$(AC_HOSTINFO))" "" - FILES_SKIP := $(filter icmp/%,$(FILES)) +ifeq "$(findstring apple,$(AC_HOSTINFO))" "" + FILES_SKIP += $(filter icmp/%,$(FILES)) +endif -else ifneq "$(RUN_SLOW_TESTS)" "1" +# +# Remove tests which are known to be slow, unless we want them to be run. +# +ifneq "$(RUN_SLOW_TESTS)" "1" FILES_SKIP += $(filter imap/%,$(FILES)) endif @@ -59,8 +58,8 @@ endef # # Ensure that "rlm_foo.a" is built when we run a module from directory "foo" # -$(foreach x,$(FILES),$(eval $(call MODULE_FILTER,$(firstword $(subst /, ,$x)),$x))) FILES := $(filter-out $(FILES_SKIP),$(FILES)) +$(foreach x,$(FILES),$(eval $(call MODULE_FILTER,$(firstword $(subst /, ,$x)),$x))) $(eval $(call TEST_BOOTSTRAP)) #