summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-11-16 18:53:11 +0000
committerSimon McVittie <smcv@collabora.com>2018-12-03 17:42:48 +0000
commit1191262f5ebb881f9a07862f0b7b9176c502edc1 (patch)
tree58feb0c17af77a09d8474cca0c8fdb6833bc2851 /configure.ac
parentebe5744375885542daadddd84b143a4414bae513 (diff)
downloaddbus-1191262f5ebb881f9a07862f0b7b9176c502edc1.tar.gz
Translate Python-based tests to C
This simplifies bootstrapping: now you don't have to build dbus, build dbus-python (with GLib), and use dbus-python to test dbus. It also avoids test failures when using facilities like AddressSanitizer. When libdbus is built with AddressSanitizer, but the system copies of Python and dbus-python were not, dbus-python will exit the Python interpreter on load, because libasan wasn't already initialized. The simplest way to avoid this is to not use Python: the scripts are not *that* hard to translate into C. Both of these tests happen to be conditionally compiled for Unix only. test_activation_forking() relies on code in TestSuiteForkingEchoService that calls fork(), which can only work on Unix; meanwhile, test_system_signals() tests the system bus configuration, which is only relevant to Unix because we don't support using dbus-daemon as a privilege boundary on Windows (and in any case D-Bus is not a Windows OS feature, so the system bus cannot be used to communicate with OS services like it can on most Linux systems). This is also a partial solution to <https://gitlab.freedesktop.org/dbus/dbus/issues/135>, by reducing the size of name-test/. For this to work, we need to build the test-service helper executable even if embedded tests are disabled. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 1 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 64a655b1..4b6cba6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,7 +247,7 @@ AC_ARG_ENABLE([tests],
[
if test "x$enableval" = xyes; then
AC_MSG_NOTICE([Full test coverage was requested with --enable-tests=yes])
- AC_MSG_NOTICE([This has many dependencies (GLib, Python etc.)])
+ AC_MSG_NOTICE([This requires GLib])
fi
enable_embedded_tests=$enableval
enable_modular_tests=$enableval
@@ -313,22 +313,6 @@ AC_ARG_ENABLE([installed-tests],
AM_CONDITIONAL([DBUS_ENABLE_INSTALLED_TESTS],
[test "x$enable_installed_tests" = xyes])
-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, dbus-python, pygi])
- AM_PATH_PYTHON([2.6])
- AC_MSG_CHECKING([for Python modules for full test coverage])
- if "$PYTHON" -c "import dbus, gi.repository.GObject, dbus.mainloop.glib"; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([cannot import dbus, gi.repository.GObject, dbus.mainloop.glib Python modules])
- fi
-else
- # --enable-tests not given: do not abort if Python is missing
- AM_PATH_PYTHON([2.6], [], [:])
-fi
-
if test x$enable_verbose_mode = xyes; then
AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
fi