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 <s.sager@kunbus.com>
This commit is contained in:
Sven Sager
2025-05-22 12:53:05 +02:00
parent a977884e17
commit 983c6cefea

View File

@@ -30,7 +30,7 @@ run_tests:
- apt-get -y install dbus libgirepository1.0-dev - apt-get -y install dbus libgirepository1.0-dev
- dbus-uuidgen --ensure=/etc/machine-id - dbus-uuidgen --ensure=/etc/machine-id
- pip install -r requirements.txt - 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+)?\%)$/' coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts: artifacts:
reports: reports: