]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
build: Skip tls-fuzzer when python-six is not available.
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Sat, 21 Dec 2024 15:00:39 +0000 (00:00 +0900)
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>
Sun, 22 Dec 2024 01:13:02 +0000 (10:13 +0900)
* configure.ac [HAVE_PYTHON_SIX]: New conditional.
* tests/suite/Makefile.am (scripts_to_test)
[HAVE_PYTHON_SIX]: Conditionally include tls-fuzzer test scripts.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
configure.ac
tests/suite/Makefile.am

index c3e34ee42d4ad31100d21b93ed1083ccf9cc0c4a..fe0a3dd0768886cb243bfb0199b8ab68af1f4b42 100644 (file)
@@ -536,6 +536,12 @@ if test "$full_test_suite" = yes || test -e "${srcdir}/.git"; then
        AM_PATH_PYTHON([3.6])
 fi
 
+AM_CONDITIONAL([HAVE_PYTHON_SIX], [$PYTHON -c 'import six' 2>/dev/null])
+if test "$full_test_suite" = yes; then
+   AM_COND_IF([HAVE_PYTHON_SIX],,
+        AC_MSG_WARN(['six' python module not found; skipping tls-fuzzer tests]))
+fi
+
 AC_ARG_ENABLE(oldgnutls-interop,
   AS_HELP_STRING([--enable-oldgnutls-interop], [enable interoperability testing with old gnutls version]),
     enable_oldgnutls_interop=$enableval, enable_oldgnutls_interop=no)
index 83e5566b43187a4d7398dcc6fdbb63005d9f60ab..ef49b391399d180e02c481115b4cef1b912439da 100644 (file)
@@ -44,11 +44,14 @@ scripts_to_test = chain.sh \
        testcompat-polarssl-serv-no-etm.sh \
        testrandom.sh \
        test-ciphersuite-names.sh \
-       tls-fuzzer/tls-fuzzer-nocert.sh \
+       multi-ticket-reception.sh
+
+if HAVE_PYTHON_SIX
+scripts_to_test += tls-fuzzer/tls-fuzzer-nocert.sh \
        tls-fuzzer/tls-fuzzer-cert.sh tls-fuzzer/tls-fuzzer-alpn.sh \
        tls-fuzzer/tls-fuzzer-nocert-tls13.sh tls-fuzzer/tls-fuzzer-psk.sh \
-       tls-fuzzer/tls-fuzzer-nolimit.sh tls-fuzzer/tls-fuzzer-nolimit-tls13.sh \
-       multi-ticket-reception.sh
+       tls-fuzzer/tls-fuzzer-nolimit.sh tls-fuzzer/tls-fuzzer-nolimit-tls13.sh
+endif
 
 TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT)                                   \
        LC_ALL="C"                                                      \
@@ -67,7 +70,9 @@ TESTS_ENVIRONMENT += ENABLE_NON_SUITEB_CURVES=1
 endif
 
 if ENABLE_SSL3
+if HAVE_PYTHON_SIX
 scripts_to_test += tls-fuzzer/tls-fuzzer-nocert-ssl3.sh
+endif
 TESTS_ENVIRONMENT += ENABLE_SSL3=1
 endif