[tracker-miners/sam/test-runner-fix] tests: Use dbus-run-session instead of dbus-launch
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/sam/test-runner-fix] tests: Use dbus-run-session instead of dbus-launch
- Date: Tue, 5 Mar 2019 20:32:34 +0000 (UTC)
commit 098e2f2a2309e3434f7e87689fc5110bcd29a577
Author: Sam Thursfield <sam afuera me uk>
Date: Sat Sep 15 17:18:17 2018 +0200
tests: Use dbus-run-session instead of dbus-launch
This also fixes an issue in the functional-test runner script which caused
failed tests to appear as if they succeeded.
See https://gitlab.gnome.org/GNOME/tracker-miners/issues/44
.gitlab-ci.yml | 2 +-
tests/functional-tests/test-runner.sh | 11 +----------
2 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a63c6d7a1..bbc9f52d1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,7 +27,7 @@ test-fedora-latest:
# screenful of junk each time unless we strip these.
unset $(env|grep -o '^CI_[^=]*')
- su tracker -c 'cd build; LANG=en_US.UTF8 dbus-launch meson test --suite tracker-miners
--print-errorlogs'
+ su tracker -c 'cd build; dbus-run-session -- env LANG=en_US.UTF8 meson test --suite tracker-miners
--print-errorlogs'
artifacts:
when: always
diff --git a/tests/functional-tests/test-runner.sh b/tests/functional-tests/test-runner.sh
index 29eed46b3..29cd65f78 100755
--- a/tests/functional-tests/test-runner.sh
+++ b/tests/functional-tests/test-runner.sh
@@ -6,8 +6,6 @@ set -e
SCRIPT=$1
-DBUS_SESSION_BUS_PID=
-
export TEMP_DIR=`mktemp --tmpdir -d tracker-test-XXXX`
# We need to use the actual home directory for some tests because
@@ -18,13 +16,6 @@ export REAL_HOME=`echo ~`
# in the filesystem
HOME=$TEMP_DIR
-eval `dbus-launch --sh-syntax`
-
-trap "/bin/kill $DBUS_SESSION_BUS_PID; exit" INT ERR
-
-echo "Running $@"
-$@
-
-kill $DBUS_SESSION_BUS_PID
+dbus-run-session $@
rm -R $TEMP_DIR
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]