Skip to content

Optionally install tests and examples

Simon McVittie requested to merge smcv/pipewire:installed-tests into master
  • spa examples: Load plugins from SPA_PLUGIN_DIR or installed path

    This lets them be used installed or uninstalled, like pipewire itself.

  • Optionally install examples and tests

    This makes it easier to test PipeWire in its "as-installed" state, for example in an OS distribution.

    The .test metadata files in {datadir}/installed-tests/{package} are a convention taken from GNOME's installed-tests initiative, allowing a generic test-runner like gnome-desktop-testing to discover and run tests in an automatic way.

    The installation path {libexecdir}/installed-tests/{package} is also a convention borrowed from GNOME's installed-tests initiative.

    In addition to the automated tests, I've installed example executables in the same place, for manual testing. They could be separated into a different directory if desired, but they seem like they have more similarities with the automated tests than differences: both are there to test that PipeWire works correctly, and neither should be relied on for production use. Some examples are installed in subdirectories to avoid name clashes.


As briefly discussed with @gkiagia while looking at updating PipeWire to v0.3.x in Debian.

Probably not all the examples work as intended, because I don't know exactly how and under what circumstances they are expected to work. However, the tests appear to pass when run with gnome-desktop-testing.

To test:

  • install to a prefix of your choice, let's say /prefix
  • optionally move the source and build directories out of the way, to check that the tests are not hard-coding any paths in those directories
  • XDG_DATA_DIRS="/prefix/share:$XDG_DATA_DIRS" gnome-desktop-testing-runner pipewire-0.3

The libcamera part is untested, because the libcamera snapshot in Debian is currently broken.

Edited by Simon McVittie

Merge request reports