From 983c6cefeaba598f3355b29cf333fd6df585b35c Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Thu, 22 May 2025 12:53:05 +0200 Subject: [PATCH] ci: Start dbus session bus for testing A dbus session bus must be started for testing. The command `dbus-run-session` creates a session for the following command. As a result, `pytest` runs with its own session bus for the tests. Signed-off-by: Sven Sager --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb209ed..89107aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ run_tests: - apt-get -y install dbus libgirepository1.0-dev - dbus-uuidgen --ensure=/etc/machine-id - pip install -r requirements.txt - - PYTHONPATH=src pytest -v --junitxml=report.xml --cov=src --cov-report term --cov-report xml:coverage.xml + - PYTHONPATH=src dbus-run-session -- pytest -v --junitxml=report.xml --cov=src --cov-report term --cov-report xml:coverage.xml coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' artifacts: reports: