Move the spa tests to the pwtest framework. The pod tests have only been
wrapped in the function callers, they don't use the variuos pwtest helpers -
too much work for very little gain here. Can be done incrementally if needed.
Note that this removes the spa tests from the installed tests. Arguably,
installing those tests was unnecessary anyway since they are static binaries
and don't load anything. So having them installed runs the same tests as
having them run in the source tree.
Goal for the pwtest framework is to allow for installed tests, just not there
yet.
If we have a C++ compiler, compile all the #include tests with that - it'll
pick up any issues that a C compiler will pick up anyway. This saves us from
having a separate C++ compiler test and it'll test each header separately for
C++ compatibility..
For each header in the spa directory, generate a compilation test that
includes just that header. This way we can pick up missing #includes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Replace the manually maintained header list with a Python script that finds
all header files and includes them in order. This adds another 25 or so
previously headers to the C++ compilation 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 deeper subdirectories
to avoid name clashes.
Signed-off-by: Simon McVittie <smcv@debian.org>
FreeBSD doesn't provide timerfd and eventfd functions. These are implemented in
3rd party library called epoll-shim. Link targets requiring these functions to
this library.
meson < 0.46 does not allow two targets to share the same name;
meson >= 0.46 relaxes that requirement, but I see no reason to require
a new version of meson just for this
Remove the spa_pod_iter helpers
Remove builder/parser vararg recurse option, you have to
manually recurse into structures when needed. This simplifies
things a lot.
Pass spa_pod_frames to builder and parser explicitly, we don't
have to keep an internal stack anymore.
The parser is now almost a mirror image of the builder.
Make the parser safer when iterating over objects, add functions
to check and get pod contents in a safe way.
Make the builder return errno style results on errors
Improve performance of object properties when they are stored and
retrieved in the same order.
Add many more tests for the builder and parser
Add some benchmarks
Only allow properties inside objects, this makes it easier to
iterate the object, which is needed for efficiently processing
control streams.
Add a choice type to mark variable properties.
SPA_TYPE_Enum -> SPA_TYPE_Id to avoid confusion with choice enum
Make it easier to allocate and initialize properties on the stack
Make more efficient methods to make objects.
Add control properties to audiotestsrc for frequency and volume
and add a test program.
Add size parameter to set_io for additional checks and to make it
easy to know how much control data we can write.
using JSON for formats or properties is not a good idea because we can't
add more types like pointers, fd, rectangles without weird hacks. Our
PODs are more easy to parse and extend and now there is an easy way
to parse and create them as well.
Make a default logger and mapper in a .h file to be used by examples
Remove logger and mapper from libs
Make method to set the default mapper for the debug methods
Improve event and command init so that it can be used more easily
as compound literals.
Improve volume
Make it possible to use graph scheduler in test-mixer
Unify input and output io areas.
Add support for ranges in the io area.
Automatically recycle buffers in the output areas in process_output
Improve the mixer, add use_buffer support, use a queue of input buffers,
fix mixing, add support for ranges.
Fix mixer and v4l2 tests
POD (plain old data) objects are similar to LV2 Atoms and allows storage
and construction of datastructures in memory or on the stack. They can
be copied with a simple memcpy.
The idea is to use this to construct the network messages and to replace
the structures used for describing formats and properties.
Move array and map to pinos
Move more things to spa lib
ControlCmd -> Message
Make pinos log, use for plugins as well
work on ringbuffer in alsa and nodes
work on making registry with all objects
Remove the thread from alsa sink and use the pollfd event.
Make it possible to pass multiple fds in one pollfd event
Add 3 callbacks to the pollfd event and add support for timeouts