mirror of
https://github.com/esphome/esphome.git
synced 2025-03-29 11:49:00 +01:00
[CI] Introduce testing for IDF 5 (and other arbitrary framework versions) (#6802)
* Initial changes to support testing of additional framework versions * Rename Arduino test files
This commit is contained in:
parent
a59c9b4f77
commit
f6848fe24d
1689 changed files with 95 additions and 16 deletions
script
tests/components
a01nyub
a02yyuw
a4988
absolute_humidity
ac_dimmer
adc
test.esp32-ard.yamltest.esp32-c3-ard.yamltest.esp32-s2-ard.yamltest.esp32-s3-ard.yamltest.esp8266-ard.yamltest.rp2040-ard.yaml
adc128s102
addressable_light
ade7880
ade7953_i2c
ade7953_spi
ads1115
ags10
aht10
airthings_wave_mini
airthings_wave_plus
alarm_control_panel
alpha3
am2315c
am2320
am43
analog_threshold
animation
anova
apds9960
api
as3935_i2c
as3935_spi
|
@ -24,8 +24,8 @@ fi
|
|||
|
||||
start_esphome() {
|
||||
# create dynamic yaml file in `build` folder.
|
||||
# `./tests/test_build_components/build/[target_component].[test_name].[target_platform].yaml`
|
||||
component_test_file="./tests/test_build_components/build/$target_component.$test_name.$target_platform.yaml"
|
||||
# `./tests/test_build_components/build/[target_component].[test_name].[target_platform_with_version].yaml`
|
||||
component_test_file="./tests/test_build_components/build/$target_component.$test_name.$target_platform_with_version.yaml"
|
||||
|
||||
cp $target_platform_file $component_test_file
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
|
@ -36,7 +36,7 @@ start_esphome() {
|
|||
fi
|
||||
|
||||
# Start esphome process
|
||||
echo "> [$target_component] [$test_name] [$target_platform]"
|
||||
echo "> [$target_component] [$test_name] [$target_platform_with_version]"
|
||||
set -x
|
||||
# TODO: Validate escape of Command line substitution value
|
||||
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
|
||||
|
@ -76,16 +76,17 @@ for f in ./tests/components/$target_component/*.*.yaml; do
|
|||
# 2. `./tests/test_build_components/build_components_base.[target_platform]-ard.yaml`
|
||||
target_platform_file="./tests/test_build_components/build_components_base.$target_platform.yaml"
|
||||
if ! [ -f "$target_platform_file" ]; then
|
||||
# Try find arduino test framework as platform.
|
||||
target_platform_ard="$target_platform-ard"
|
||||
target_platform_file="./tests/test_build_components/build_components_base.$target_platform_ard.yaml"
|
||||
if ! [ -f "$target_platform_file" ]; then
|
||||
echo "No base test file [./tests/test_build_components/build_components_base.$target_platform.yaml, ./tests/build_components_base.$target_platform_ard.yaml] for component test [$f] found."
|
||||
exit 1
|
||||
fi
|
||||
target_platform=$target_platform_ard
|
||||
echo "No base test file [./tests/test_build_components/build_components_base.$target_platform.yaml] for component test [$f] found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
start_esphome
|
||||
for target_platform_file in ./tests/test_build_components/build_components_base.$target_platform*.yaml; do
|
||||
# trim off "./tests/test_build_components/build_components_base." prefix
|
||||
target_platform_with_version=${target_platform_file:52}
|
||||
# ...now remove suffix starting with "." leaving just the test target hardware and software platform (possibly with version)
|
||||
# For example: "esp32-s3-idf-50"
|
||||
target_platform_with_version=${target_platform_with_version%.*}
|
||||
start_esphome
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue