mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 17:48:40 +00:00
[ci] Honor CONFLICTS_WITH when grouping component tests
The test-grouping pipeline merged components that share a bus signature into a single config without checking CONFLICTS_WITH. When bme68x_bsec2 declared CONFLICTS_WITH=["bme680_bsec"] (and vice versa), the merged YAML containing both failed validation. Statically parse AUTO_LOAD and CONFLICTS_WITH from every component __init__.py, propagate conflicts through AUTO_LOAD, and split any group that contains a conflicting pair into separate builds.
This commit is contained in:
@@ -37,6 +37,7 @@ from script.analyze_component_buses import (
|
||||
create_grouping_signature,
|
||||
is_platform_component,
|
||||
merge_compatible_bus_groups,
|
||||
split_conflicting_groups,
|
||||
uses_local_file_references,
|
||||
)
|
||||
from script.helpers import get_component_test_files
|
||||
@@ -675,6 +676,13 @@ def run_grouped_component_tests(
|
||||
# as long as they don't have conflicting configurations for the same bus type
|
||||
grouped_components = merge_compatible_bus_groups(grouped_components)
|
||||
|
||||
# Split groups that contain components declaring CONFLICTS_WITH each other.
|
||||
# The bus-level merge above only considers shared bus configs; components
|
||||
# with the same bus signature (e.g. both I2C) can still be mutually
|
||||
# incompatible (e.g. bme680_bsec vs. bme68x_bsec2_i2c which auto-loads
|
||||
# bme68x_bsec2). Those must end up in separate builds.
|
||||
grouped_components = split_conflicting_groups(grouped_components)
|
||||
|
||||
# Print detailed grouping plan
|
||||
print("\nGrouping Plan:")
|
||||
print("-" * 80)
|
||||
|
||||
Reference in New Issue
Block a user