Merge pull request #118703 from mweinelt/home-assistant-precheck-componenttest

home-assistant: error out if enabled component test does not exist
This commit is contained in:
Martin Weinelt 2021-04-08 00:56:44 +02:00 committed by GitHub
commit 024cee2534
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 = {