Commit dc632829 authored by Simon McVittie's avatar Simon McVittie

If --enable-tests=yes, require Python modules for complete test coverage

The two relevant tests already exit 0 with a message if importing those
modules fails.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37847Reviewed-by: Will Thompson's avatarWill Thompson <will.thompson@collabora.co.uk>
parent 3f1af382
...@@ -229,8 +229,15 @@ AM_CONDITIONAL([DBUS_ENABLE_INSTALLED_TESTS], ...@@ -229,8 +229,15 @@ AM_CONDITIONAL([DBUS_ENABLE_INSTALLED_TESTS],
if test "x$enable_tests" = xyes; then if test "x$enable_tests" = xyes; then
# full test coverage is required, Python is a hard dependency # full test coverage is required, Python is a hard dependency
AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python]) AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
AM_PATH_PYTHON([2.6]) AM_PATH_PYTHON([2.6])
AC_MSG_CHECKING([for Python modules for full test coverage])
if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
fi
else else
# --enable-tests not given: do not abort if Python is missing # --enable-tests not given: do not abort if Python is missing
AM_PATH_PYTHON([2.6], [], [:]) AM_PATH_PYTHON([2.6], [], [:])
......
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