Closed stefano-garzarella closed 10 months ago
With this PR, I'm able to start pipewire
and dbus
in the container to run the vhost-user-sound
tests in this way:
export DBUS_SESSION_BUS_ADDRESS="$(/usr/bin/dbus-daemon --system --print-address)"
export XDG_RUNTIME_DIR=/tmp
pipewire &
cd vhost-device/staging
cargo test
Where do you think is the best place to launch these daemons?
I was thinking in the vhost-device custom pipeline (at each command where I need it), but I don't know if there is a better place.
@stefano-garzarella we could add them as Rust tests that don't run by default, then manually execute them in the pipeline. The assert_cmd
crate gives a nice interface to run your crate's binary inside a test: https://docs.rs/assert_cmd/latest/assert_cmd/cmd/struct.Command.html#method.cargo_bin
@epilys cool! That would be nice.
However in both cases we have to modify the pipeline, so the advantage is just having the commands directly in the tests. But is it generic enough to work anywhere, or is it specific to our container? I need to look into it more, but not this week :-(
But is it generic enough to work anywhere, or is it specific to our container?
Hm anywhere with alsa and/or pipewire and dbus, certainly 🤔 . So it'd run in the container and dev machines. I'll make a draft PR with test stubs today/tomorrow for a proof of concept.
Gentle ping :-) This PR should be ready, and with https://github.com/rust-vmm/vhost-device/pull/515 we tested that it works properly.
Summary of the PR
This PR reduces pipewire dependencies and install
dbus
(needed to run pipewire).CC @epilys
Requirements
Before submitting your PR, please make sure you addressed the following requirements:
git commit -s
), and the commit message has max 60 characters for the summary and max 75 characters for each description line.unsafe
code is properly documented.