]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
if there's no TLS, skip tests which need TLS
authorAlan T. DeKok <aland@freeradius.org>
Thu, 30 Apr 2020 01:59:22 +0000 (21:59 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 30 Apr 2020 02:07:32 +0000 (22:07 -0400)
src/tests/unit/all.mk

index 9f9703948780ad5706ba872229bd2b34de7ed221..ac7dc4b361ab78bfa84357ffa60fde9ae45925ed 100644 (file)
@@ -8,15 +8,29 @@
 TEST := test.unit
 
 #
-#  The files are put here in order.  Later tests need
-#  functionality from earlier test.
+#  Get all .txt files
 #
-FILES  := $(subst $(DIR)/,,$(call FIND_FILES_SUFFIX,$(DIR),*.txt))
+FILES  := $(call FIND_FILES_SUFFIX,$(DIR),*.txt)
+
+#
+#  If we don't have OpenSSL, filter out tests which need TLS.
+#
+ifeq "$(AC_HAVE_OPENSSL_SSL_H)" ""
+FILES := $(filter-out $(shell grep -l 'need-feature tls' $(FILES)),$(FILES))
+endif
+
+#
+#  Remove our directory prefix, which is needed by the bootstrap function.
+#
+FILES := $(subst $(DIR)/,,$(FILES))
 
 # dict.txt - removed because the unit tests don't allow for protocol namespaces
 
 # command.txt - removed because commands like ":sql" are not parsed properly any more
 
+#
+#  Bootstrap the test framework.
+#
 $(eval $(call TEST_BOOTSTRAP))
 
 #