mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-04-27 11:53:15 +01:00
Minimize D-Bus requirements for tests (#5265)
This PR minimizes the D-Bus requirements for tests. It does this by using dbus-daemon directly instead of dbus-launch. The latter is meant for graphical applications and therefor has X11 dependencies. It also leaves the D-Bus daemon running after the tests are done. This will accumulate dbus-daemon processes over time which is not ideal. I've also considered using dbus-run-session since it is meant to launch processes with a private D-Bus session. For Python tests one could launch it like so: dbus-run-session -- python3 -m pytest ... Then `DBUS_SESSION_BUS_ADDRESS` would be used automatically by the `MessageBus` class. However, to keep the current behavior of the tests, launching the D-Bus daemon manually is the better option.
This commit is contained in:
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -313,7 +313,7 @@ jobs:
|
||||
- name: Install additional system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends libpulse0 libudev1 dbus dbus-x11
|
||||
sudo apt-get install -y --no-install-recommends libpulse0 libudev1 dbus-daemon
|
||||
- name: Register Python problem matcher
|
||||
run: |
|
||||
echo "::add-matcher::.github/workflows/matchers/python.json"
|
||||
|
||||
Reference in New Issue
Block a user