From: Simon McVittie Date: Wed, 24 Aug 2011 11:24:28 +0000 (+0100) Subject: If --enable-tests=yes, require Python modules for complete test coverage X-Git-Tag: dbus-1.4.16~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc632829db498795824f08af0f9191874e7ef672;p=thirdparty%2Fdbus.git 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=37847 Reviewed-by: Will Thompson --- diff --git a/configure.ac b/configure.ac index f44dfe3ee..947974300 100644 --- a/configure.ac +++ b/configure.ac @@ -229,8 +229,15 @@ AM_CONDITIONAL([DBUS_ENABLE_INSTALLED_TESTS], if test "x$enable_tests" = xyes; then # 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]) + 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 # --enable-tests not given: do not abort if Python is missing AM_PATH_PYTHON([2.6], [], [:])