add way to exclude tests from all

This commit is contained in:
Tomasz Duda 2024-07-08 10:22:06 +02:00
parent 4418ed3526
commit 08d35da057
3 changed files with 9 additions and 0 deletions

View file

@ -53,6 +53,10 @@ for f in ./tests/components/$target_component/*.*.yaml; do
IFS='.' read -r -a file_name <<< "${folder_name[4]}"
test_name="${file_name[0]}"
if [ "$test_name" = "exclude" ]; then
# this is not a test file. we need to skip it.
continue
fi
target_platform="${file_name[1]}"
file_name_parts=${#file_name[@]}
@ -64,6 +68,11 @@ for f in ./tests/components/$target_component/*.*.yaml; do
IFS='.' read -r -a file_name <<< "${folder_name[3]}"
target_platform="${file_name[1]}"
if [ -f "./tests/components/$target_component/exclude.$test_name.$target_platform.yaml" ]; then
echo "Component $target_component is excluded from testing on $target_platform"
continue
fi
start_esphome
done