1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-18 17:53:47 +01:00
This commit is contained in:
J. Nick Koston
2025-10-08 13:52:27 -10:00
parent 7cca868c41
commit 1448969019

View File

@@ -6,7 +6,7 @@ help() {
echo "Usage: $0 [-e <config|compile|clean>] [-c <string>] [-t <string>] [-f]" 1>&2
echo 1>&2
echo " - e - Parameter for esphome command. Default compile. Common alternative is config." 1>&2
echo " - c - Component folder name to test. Default *. E.g. '-c logger'." 1>&2
echo " - c - Component folder name(s) to test. Default *. Supports comma-separated list. E.g. '-c logger' or '-c logger,api,ota'." 1>&2
echo " - t - Target name to test. Put '-t list' to display all possibilities. E.g. '-t esp32-s2-idf-51'." 1>&2
echo " - f - Continue on fail. Don't exit on first error." 1>&2
exit 1
@@ -65,10 +65,14 @@ start_esphome() {
{ set +x; } 2>/dev/null
}
# Split comma-separated components into array
IFS=',' read -r -a component_list <<< "$target_component"
# Find all test yaml files.
# - `./tests/components/[target_component]/[test_name].[target_platform].yaml`
# - `./tests/components/[target_component]/[test_name].all.yaml`
for f in ./tests/components/$target_component/*.*.yaml; do
for component_pattern in "${component_list[@]}"; do
for f in ./tests/components/$component_pattern/*.*.yaml; do
[ -f "$f" ] || continue
IFS='/' read -r -a folder_name <<< "$f"
target_component="${folder_name[3]}"
@@ -112,3 +116,4 @@ for f in ./tests/components/$target_component/*.*.yaml; do
done
fi
done
done