e879eb6db6
This adds two tests. One is for whether the paths used by the module are present, while the other is for testing functionality of PipeWire itself. This is done with the recent addition of installed tests by upstream.
21 lines
626 B
Nix
21 lines
626 B
Nix
{ lib, runCommand, pipewire, paths-out, paths-lib }:
|
|
|
|
runCommand "pipewire-test-paths" { } ''
|
|
${lib.concatMapStringsSep "\n" (p: ''
|
|
if [ ! -f "${pipewire.lib}/${p}" ] && [ ! -d "${pipewire.lib}/${p}" ]; then
|
|
printf "pipewire failed to find the following path: %s\n" "${pipewire.lib}/${p}"
|
|
error=error
|
|
fi
|
|
'') paths-lib}
|
|
|
|
${lib.concatMapStringsSep "\n" (p: ''
|
|
if [ ! -f "${pipewire}/${p}" ] && [ ! -d "${pipewire}/${p}" ]; then
|
|
printf "pipewire failed to find the following path: %s\n" "${pipewire}/${p}"
|
|
error=error
|
|
fi
|
|
'') paths-out}
|
|
|
|
[ -n "$error" ] && exit 1
|
|
touch $out
|
|
''
|