mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 11:05:14 +00:00
home-assistant: error out if enabled component test does not exist
Unfortunately enabling xdist hides the error away and the tests fail abruptly with no clear indication of what went wrong. Only after disabling xdist (`-n auto`, `--dist loadfile`) you would see > ERROR: file or directory not found: tests/components/openhome https://github.com/NixOS/nixpkgs/pull/118453#issuecomment-814491608
This commit is contained in:
parent
af4b72b618
commit
b85dd8136e
@ -383,6 +383,14 @@ in with py.pkgs; buildPythonApplication rec {
|
||||
preCheck = ''
|
||||
# the tests require the existance of a media dir
|
||||
mkdir /build/media
|
||||
|
||||
# error out when component test directory is missing, otherwise hidden by xdist execution :(
|
||||
for component in ${lib.concatStringsSep " " (map lib.escapeShellArg componentTests)}; do
|
||||
test -d "tests/components/$component" || {
|
||||
>2& echo "ERROR: Tests for component '$component' were enabled, but they do not exist!"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
Loading…
Reference in New Issue
Block a user