[tracker: 1/2] tests: Use dbus-run-session instead of dbus-launch



commit 06d00471ebe57083e88829b27f7b904dd6b81de0
Author: Andrea Azzarone <andrea azzarone canonical com>
Date:   Thu Dec 13 18:30:24 2018 +0000

    tests: Use dbus-run-session instead of dbus-launch
    
    Fixes: https://gitlab.gnome.org/GNOME/tracker/issues/62

 .gitlab-ci.yml                        |  2 +-
 tests/functional-tests/test-runner.sh | 10 +---------
 2 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 75470763b..e3c7e8121 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,4 +15,4 @@ 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 --print-errorlogs'
+      su tracker -c 'cd build; dbus-run-session -- env LANG=en_US.UTF8 meson test --print-errorlogs'
diff --git a/tests/functional-tests/test-runner.sh b/tests/functional-tests/test-runner.sh
index 15967f39e..fe6919c0c 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,7 @@ export REAL_HOME=`echo ~`
 # in the filesystem
 HOME=$TEMP_DIR
 
-eval `dbus-launch --sh-syntax`
-
-trap "/bin/kill $DBUS_SESSION_BUS_PID; exit 1" INT
-
 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]