[tests] make test_build_components work with venv without installing esphome (#6761)

This commit is contained in:
tomaszduda23 2024-05-19 01:47:23 +02:00 committed by GitHub
parent 70e0925f9a
commit 4469ba4024
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,9 +37,10 @@ start_esphome() {
# Start esphome process
echo "> [$target_component] [$test_name] [$target_platform]"
echo "esphome -s component_name $target_component -s component_dir ../../components/$target_component -s test_name $test_name -s target_platform $target_platform $esphome_command $component_test_file"
set -x
# TODO: Validate escape of Command line substitution value
esphome -s component_name $target_component -s component_dir ../../components/$target_component -s test_name $test_name -s target_platform $target_platform $esphome_command $component_test_file
python -m esphome -s component_name $target_component -s component_dir ../../components/$target_component -s test_name $test_name -s target_platform $target_platform $esphome_command $component_test_file
{ set +x; } 2>/dev/null
}
# Find all test yaml files.