[gjs/wip/ptomato/tests: 49/59] build: Use dbus-run-session
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/tests: 49/59] build: Use dbus-run-session
- Date: Wed, 16 Nov 2016 05:54:52 +0000 (UTC)
commit eff6d4220e77d9bc50a01d5e98aef266c862b0ca
Author: Philip Chimento <philip chimento gmail com>
Date: Tue Nov 15 21:08:00 2016 -0800
build: Use dbus-run-session
DBus 1.8 gained a utility called dbus-run-session, that will run another
program inside a new session bus and then shut down the session bus
afterwards. This can replace the hand-rolled run-with-dbus script.
Even though we started a fake system bus with run-with-dbus, I don't
believe it was used. We also generated extra configuration files with
which to start the buses, but I don't believe those were necessary
either.
https://bugzilla.gnome.org/show_bug.cgi?id=771745
Makefile-test.am | 15 ++---
configure.ac | 6 +-
test/run-with-dbus | 184 ----------------------------------------------------
3 files changed, 9 insertions(+), 196 deletions(-)
---
diff --git a/Makefile-test.am b/Makefile-test.am
index 608b9cf..9e5b17c 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -1,8 +1,6 @@
-EXTRA_DIST += \
- test/run-with-dbus \
- test/test-bus.conf
+EXTRA_DIST += test/test-bus.conf
-TEST_PROGS_OPTIONS =
+TEST_PROGS_OPTIONS = 2>test_user_data/logs/stderr.log
if XVFB_TESTS
XVFB_INVOCATION = $(XVFB) -ac -noreset -screen 0 1024x768x16
@@ -24,7 +22,9 @@ XVFB_START =
endif
if DBUS_TESTS
-RUN_WITH_DBUS = ${top_srcdir}/test/run-with-dbus --session --system
+LOG_COMPILER = $(DBUS_RUN_SESSION)
+AM_LOG_FLAGS = --config-file=$(srcdir)/test/test-bus.conf --
+RUN_WITH_DBUS = $(LOG_COMPILER) $(AM_LOG_FLAGS)
else
RUN_WITH_DBUS =
TEST_PROGS_OPTIONS += -s /js/GDBus
@@ -35,7 +35,6 @@ TEST_PROGS_OPTIONS += -s /js/Gtk
endif
GTESTER = ${XVFB_START} ${TESTS_ENVIRONMENT} ${RUN_WITH_DBUS} gtester
-CLEANFILES += uninstalled-system-test-bus.conf uninstalled-test-bus.conf
clean-local: test-user-data-clean
test-user-data-clean:
@@ -115,16 +114,14 @@ check-local: gjs-tests
TESTS_ENVIRONMENT = \
TOP_SRCDIR=$(abs_top_srcdir) \
TOP_BUILDDIR=$(abs_top_builddir) \
- DBUS_SESSION_BUS_ADDRESS='' \
XDG_DATA_HOME=test_user_data \
GJS_DEBUG_OUTPUT=test_user_data/logs/gjs.log \
- BUILDDIR=. \
GJS_USE_UNINSTALLED_FILES=1 \
GJS_TEST_TIMEOUT=420 \
GJS_PATH= \
LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(FIREFOX_JS_LIBDIR)" \
G_FILENAME_ENCODING=latin1 # ensure filenames are not utf8 \
- DBUS_UUIDGEN="$(DBUS_UUIDGEN)"
+ $(NULL)
simple_tests = test/testCommandLine.sh
EXTRA_DIST += $(simple_tests)
diff --git a/configure.ac b/configure.ac
index b9e6c92..afcebe0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,9 +198,9 @@ AC_ARG_WITH([dbus-tests],
[AS_HELP_STRING([--without-dbus-tests],
[Don't try to use DBus during make check @<:@default=use@:>@])])
AS_IF([test "x$with_dbus_tests" != "xno"], [
- AC_PATH_PROG([DBUS_UUIDGEN], [dbus-uuidgen])
- AS_IF([test -z "$DBUS_UUIDGEN"],
- [AC_MSG_ERROR([dbus-uuidgen is required for --with-dbus-tests])])
+ AC_PATH_PROG([DBUS_RUN_SESSION], [dbus-run-session])
+ AS_IF([test -z "$DBUS_RUN_SESSION"],
+ [AC_MSG_ERROR([dbus-run-session is required for --with-dbus-tests])])
])
AM_CONDITIONAL([DBUS_TESTS], [test "x$with_dbus_tests" != "xno"])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]