From f2a079204d33f65bde36de56e23cd73a20626513 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 18 Jul 2015 10:45:03 +0200 Subject: [PATCH] tests: Make dbus session automatically exit when X server dies Signed-off-by: Uli Schlachter --- tests/run.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/run.sh b/tests/run.sh index fe4d7ef1..d04eb084 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -18,9 +18,6 @@ else tests=$this_dir/test*.lua fi -# Use a separate D-Bus session; sets $DBUS_SESSION_BUS_PID. -eval $(dbus-launch --sh-syntax) - root_dir=$PWD/.. # Travis. @@ -59,6 +56,8 @@ fi # Toggles debugging mode, using XEPHYR_PAUSE. # pkill -USR1 Xephyr +# Use a separate D-Bus session; sets $DBUS_SESSION_BUS_PID. +eval $(DISPLAY="$D" dbus-launch --sh-syntax --exit-with-session) cd $root_dir/build @@ -77,7 +76,7 @@ cd - >/dev/null kill_childs() { - for p in $awesome_pid $xserver_pid $DBUS_SESSION_BUS_PID; do + for p in $awesome_pid $xserver_pid; do kill -TERM $p 2>/dev/null || true done }