Commit 27df5b73 authored by Michele Tartara's avatar Michele Tartara
Browse files

Disable python test if required libraries are missing



Some python libraries are only needed for the tests, but not for running
Ganeti. If those libraries are missing, just disable the Python tests.
Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
parent a05018a9
...@@ -1148,6 +1148,9 @@ TEST_FILES = \ ...@@ -1148,6 +1148,9 @@ TEST_FILES = \
test/py/import-export_unittest-helper test/py/import-export_unittest-helper
if PY_NODEV
python_tests=
else
python_tests = \ python_tests = \
doc/examples/rapi_testutils.py \ doc/examples/rapi_testutils.py \
test/py/cfgupgrade_unittest.py \ test/py/cfgupgrade_unittest.py \
...@@ -1228,6 +1231,7 @@ python_tests = \ ...@@ -1228,6 +1231,7 @@ python_tests = \
test/py/pycurl_reset_unittest.py \ test/py/pycurl_reset_unittest.py \
test/py/qa.qa_config_unittest.py \ test/py/qa.qa_config_unittest.py \
test/py/tempfile_fork_unittest.py test/py/tempfile_fork_unittest.py
endif
haskell_tests = test/hs/htest haskell_tests = test/hs/htest
......
...@@ -776,10 +776,25 @@ AC_PYTHON_MODULE(pyinotify, t) ...@@ -776,10 +776,25 @@ AC_PYTHON_MODULE(pyinotify, t)
AC_PYTHON_MODULE(pycurl, t) AC_PYTHON_MODULE(pycurl, t)
AC_PYTHON_MODULE(bitarray, t) AC_PYTHON_MODULE(bitarray, t)
AC_PYTHON_MODULE(ipaddr, t) AC_PYTHON_MODULE(ipaddr, t)
AC_PYTHON_MODULE(yaml, t)
AC_PYTHON_MODULE(affinity) AC_PYTHON_MODULE(affinity)
AC_PYTHON_MODULE(paramiko) AC_PYTHON_MODULE(paramiko)
# Development-only Python modules
PY_NODEV=
AC_PYTHON_MODULE(yaml)
if test $HAVE_PYMOD_YAML == "no"; then
PY_NODEV="$PY_NODEV yaml"
fi
if test -n "$PY_NODEV"; then
AC_MSG_WARN(m4_normalize([Required development modules ($PY_NODEV) were not
found, you won't be able to run Python unittests]))
else
AC_MSG_NOTICE([Python development modules found, unittests enabled])
fi
AC_SUBST(PY_NODEV)
AM_CONDITIONAL([PY_NODEV], [test -n $PY_NODEV])
AC_CONFIG_FILES([ Makefile ]) AC_CONFIG_FILES([ Makefile ])
AC_OUTPUT AC_OUTPUT
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment