1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-22 11:43:51 +01:00
This commit is contained in:
J. Nick Koston
2025-10-17 15:02:09 -10:00
parent b0ada914bc
commit e1e047c53f
4 changed files with 29 additions and 103 deletions

View File

@@ -303,16 +303,18 @@ def detect_memory_impact_config(
# Check if component has tests for any preferred platform
for test_file in test_files:
parts = test_file.stem.split(".")
if len(parts) >= 2:
platform = parts[1]
if platform in PLATFORM_PREFERENCE:
components_with_tests.append(component)
# Select the most preferred platform across all components
if selected_platform is None or PLATFORM_PREFERENCE.index(
platform
) < PLATFORM_PREFERENCE.index(selected_platform):
selected_platform = platform
break
if len(parts) < 2:
continue
platform = parts[1]
if platform not in PLATFORM_PREFERENCE:
continue
components_with_tests.append(component)
# Select the most preferred platform across all components
if selected_platform is None or PLATFORM_PREFERENCE.index(
platform
) < PLATFORM_PREFERENCE.index(selected_platform):
selected_platform = platform
break
# If no components have tests, don't run memory impact
if not components_with_tests: