diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 43e332964cf..3ddd25ce8b2 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -384,6 +384,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 = {