diff --git a/tests/py2.7-ubuntu-14.04.dockerfile b/tests/py2.7-ubuntu-14.04.dockerfile index bb61cad..7913502 100644 --- a/tests/py2.7-ubuntu-14.04.dockerfile +++ b/tests/py2.7-ubuntu-14.04.dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:14.04 RUN apt-get update -RUN apt-get install -y dbus python-gi python-pip psmisc python-dev +RUN apt-get install -y dbus python-gi python-pip psmisc python-dev dbus-x11 RUN python2 --version RUN pip2 install greenlet diff --git a/tests/py2.7-ubuntu-16.04.dockerfile b/tests/py2.7-ubuntu-16.04.dockerfile index 450df0e..98b36bc 100644 --- a/tests/py2.7-ubuntu-16.04.dockerfile +++ b/tests/py2.7-ubuntu-16.04.dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:16.04 RUN apt-get update -RUN apt-get install -y dbus python-gi python-pip psmisc +RUN apt-get install -y dbus python-gi python-pip psmisc dbus-x11 RUN python2 --version RUN pip2 install greenlet diff --git a/tests/py3.4-ubuntu-14.04.dockerfile b/tests/py3.4-ubuntu-14.04.dockerfile index 71b1c79..7938c5b 100644 --- a/tests/py3.4-ubuntu-14.04.dockerfile +++ b/tests/py3.4-ubuntu-14.04.dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:14.04 RUN apt-get update -RUN apt-get install -y dbus python3-gi python3-pip psmisc python3-dev +RUN apt-get install -y dbus python3-gi python3-pip psmisc python3-dev dbus-x11 RUN python3 --version RUN pip3 install greenlet diff --git a/tests/py3.5-ubuntu-16.04.dockerfile b/tests/py3.5-ubuntu-16.04.dockerfile index 247fcdc..e392f69 100644 --- a/tests/py3.5-ubuntu-16.04.dockerfile +++ b/tests/py3.5-ubuntu-16.04.dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:16.04 RUN apt-get update -RUN apt-get install -y dbus python3-gi python3-pip psmisc +RUN apt-get install -y dbus python3-gi python3-pip psmisc dbus-x11 RUN python3 --version RUN pip3 install greenlet diff --git a/tests/run.sh b/tests/run.sh index 436c840..bbef59d 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -1,17 +1,9 @@ #!/bin/sh set -e -ADDRESS_FILE=$(mktemp /tmp/pydbustest.XXXXXXXXX) -PID_FILE=$(mktemp /tmp/pydbustest.XXXXXXXXX) +eval `dbus-launch --sh-syntax` -dbus-daemon --session --print-address=0 --print-pid=1 --fork 0>"$ADDRESS_FILE" 1>"$PID_FILE" - -export DBUS_SESSION_BUS_ADDRESS=$(cat "$ADDRESS_FILE") -PID=$(cat "$PID_FILE") - -trap 'kill -TERM $PID' EXIT - -rm "$ADDRESS_FILE" "$PID_FILE" +trap 'kill -TERM $DBUS_SESSION_BUS_PID' EXIT PYTHON=${1:-python}