Skip to content

Commit f4787f9

Browse files
committed
Refactor tests runner script to use dbus-launch instead of dbus-daemon
1 parent 4397404 commit f4787f9

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tests/run.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
#!/bin/sh
22
set -e
33

4-
ADDRESS_FILE=$(mktemp /tmp/pydbustest.XXXXXXXXX)
5-
PID_FILE=$(mktemp /tmp/pydbustest.XXXXXXXXX)
4+
eval `dbus-launch --sh-syntax`
65

7-
dbus-daemon --session --print-address=0 --print-pid=1 --fork 0>"$ADDRESS_FILE" 1>"$PID_FILE"
8-
9-
export DBUS_SESSION_BUS_ADDRESS=$(cat "$ADDRESS_FILE")
10-
PID=$(cat "$PID_FILE")
11-
12-
trap 'kill -TERM $PID' EXIT
13-
14-
rm "$ADDRESS_FILE" "$PID_FILE"
6+
trap 'kill -TERM $DBUS_SESSION_BUS_PID' EXIT
157

168
PYTHON=${1:-python}
179

0 commit comments

Comments
 (0)