summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh <ext0l@riseup.net>2020-07-08 18:06:50 -0700
committerAsh <ext0l@riseup.net>2020-07-08 19:02:05 -0700
commit2f6a48c74bdead0695013e3fe7c0ac2552bab9aa (patch)
tree40b80b07838a88baf861e437cefaa92eedbf358f
parent2ba6cce9eb798e5f8d8bd829528ffffe3f2ff8de (diff)
downloadqutebrowser-2f6a48c74bdead0695013e3fe7c0ac2552bab9aa.tar.gz
qutebrowser-2f6a48c74bdead0695013e3fe7c0ac2552bab9aa.zip
Run tests inside dbus-run-session.
We need a dbus server, and this is the easiest way to make sure we have one.
-rw-r--r--.github/workflows/ci.yml11
-rw-r--r--tox.ini2
2 files changed, 9 insertions, 4 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e1d6ed118..0f5f84eed 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -53,7 +53,7 @@ jobs:
python -m pip install -U pip
python -m pip install -U -r misc/requirements/requirements-tox.txt
- name: "Run ${{ matrix.testenv }}"
- run: "tox -e ${{ matrix.testenv}} -- ${{ matrix.args }}"
+ run: "dbus-run-session -- tox -e ${{ matrix.testenv}} -- ${{ matrix.args }}"
tests-docker:
runs-on: ubuntu-20.04
@@ -79,7 +79,7 @@ jobs:
- uses: actions/checkout@v2
- name: Set up problem matchers
run: "python scripts/dev/ci/problemmatchers.py py38 ${{ runner.temp }}"
- - run: tox -e py38
+ - run: dbus-run-session tox -e py38
tests:
continue-on-error: "${{ matrix.experimental == true }}"
@@ -163,7 +163,12 @@ jobs:
python -m pip install -U pip
python -m pip install -U -r misc/requirements/requirements-tox.txt
- name: "Run ${{ matrix.testenv }}"
- run: "tox -e ${{ matrix.testenv}} -- ${{ matrix.args }}"
+ run: |
+ if [[ ${{ matrix.os }} == ubuntu* ]]; then
+ dbus-run-session -- tox -e ${{ matrix.testenv }} -- ${{ matrix.args }}
+ else
+ tox -e ${{ matrix.testenv }} -- ${{ matrix.args }}
+ fi
- name: Analyze backtraces
run: "bash scripts/dev/ci/backtrace.sh ${{ matrix.testenv }}"
if: "failure()"
diff --git a/tox.ini b/tox.ini
index 7a5c37d10..a7462bf83 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,7 +14,7 @@ setenv =
pyqt{,57,59,510,511,512,513,514,515}: LINK_PYQT_SKIP=true
pyqt{,57,59,510,511,512,513,514,515}: QUTE_BDD_WEBENGINE=true
cov: PYTEST_ADDOPTS=--cov --cov-report xml --cov-report=html --cov-report=
-passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI XDG_* QUTE_* DOCKER QT_QUICK_BACKEND PY_COLORS
+passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI XDG_* QUTE_* DOCKER QT_QUICK_BACKEND PY_COLORS DBUS_SESSION_BUS_ADDRESS
basepython =
py3: {env:PYTHON:python3}
py35: {env:PYTHON:python3.5}