From e724c45ed3c33ad16a9525dd44a1c9c92217876f Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.maroneze@cea.fr> Date: Thu, 30 Jul 2020 14:27:56 +0200 Subject: [PATCH] [tests] conditionally disable tests requiring Python 3.6 --- configure.in | 26 ++++++++++++++++++++++++++ share/Makefile.config.in | 11 +++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 3f792af4a5f..ba6d68bb09d 100644 --- a/configure.in +++ b/configure.in @@ -397,6 +397,31 @@ else HAS_LANDMARKS="no" fi +# Python 3 (for analysis-scripts) +######## + +AC_MSG_CHECKING(for python3) + +PYTHON3_VERSION=$(python3 --version 2>/dev/null || echo "") +if test -z "$PYTHON3_VERSION" ; then + AC_MSG_RESULT(not found. Some non-regression tests will be disabled.) + HAS_PYTHON36="no" +else + AC_MSG_RESULT(found) + AC_MSG_CHECKING(for python3 >= 3.6) + PYTHON3_VERSION=$(echo "$PYTHON3_VERSION" | cut -d' ' -f2-) + case $PYTHON3_VERSION in + 2.*|3.[[0-5]].*) + AC_MSG_RESULT(found $PYTHON3_VERSION (too old); some non-regression tests will be disabled) + HAS_PYTHON36="no" + ;; + *) + AC_MSG_RESULT(ok) + HAS_PYTHON36="yes" + ;; + esac +fi + ############ # Platform # ############ @@ -978,6 +1003,7 @@ AC_SUBST(DEVELOPMENT) AC_SUBST(HAS_APRON) AC_SUBST(HAS_MPFR) AC_SUBST(HAS_LANDMARKS) +AC_SUBST(HAS_PYTHON36) AC_SUBST(LABLGTK_VERSION) AC_SUBST(OCAMLBEST) AC_SUBST(OCAMLVERSION) diff --git a/share/Makefile.config.in b/share/Makefile.config.in index 0739e3cef9c..6f266c9ff6d 100644 --- a/share/Makefile.config.in +++ b/share/Makefile.config.in @@ -128,6 +128,9 @@ HAS_MPFR ?=@HAS_MPFR@ # landmarks HAS_LANDMARKS ?=@HAS_LANDMARKS@ +# python 3.6 +HAS_PYTHON36 ?=@HAS_PYTHON36@ + ########################## # Miscellaneous commands # ########################## @@ -157,8 +160,12 @@ HAVE_BUILTIN_VA_LIST ?=@HAVE_BUILTIN_VA_LIST@ # Non-plugin test directories containing some ML files to compile TEST_DIRS_AS_PLUGIN:=\ dynamic dynamic_plugin journal saveload spec misc syntax cil \ - pretty_printing builtins libc value fc_script -TEST_DIRS_AS_PLUGIN+=jcdb + pretty_printing builtins libc value + +ifeq ($(HAS_PYTHON36),yes) +TEST_DIRS_AS_PLUGIN+= fc_script jcdb +endif + PLUGIN_TESTS_LIST+=$(TEST_DIRS_AS_PLUGIN) ########################## -- GitLab