mirror of
https://github.com/esphome/esphome.git
synced 2025-10-13 07:13:47 +01:00
tweak
This commit is contained in:
@@ -78,6 +78,7 @@ ISOLATED_COMPONENTS = {
|
||||
"matrix_keypad": "Needs isolation due to keypad",
|
||||
"mcp4725": "no YAML config to specify i2c bus id",
|
||||
"mcp47a1": "no YAML config to specify i2c bus id",
|
||||
"modbus_controller": "Defines multiple modbus buses for testing client/server functionality - conflicts with package modbus bus",
|
||||
"packages": "cannot merge packages",
|
||||
}
|
||||
|
||||
@@ -342,7 +343,8 @@ def analyze_all_components(
|
||||
non_groupable.add(component_name)
|
||||
|
||||
# Check if component is a base bus component
|
||||
# These are platform implementations and must be tested separately
|
||||
# These ARE the bus platform implementations and define buses directly for testing
|
||||
# They cannot be grouped with components that use bus packages (causes ID conflicts)
|
||||
if component_name in BASE_BUS_COMPONENTS:
|
||||
non_groupable.add(component_name)
|
||||
|
||||
|
@@ -27,6 +27,7 @@ sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
|
||||
# pylint: disable=wrong-import-position
|
||||
from script.analyze_component_buses import (
|
||||
BASE_BUS_COMPONENTS,
|
||||
ISOLATED_COMPONENTS,
|
||||
NO_BUSES_SIGNATURE,
|
||||
analyze_all_components,
|
||||
@@ -369,6 +370,15 @@ def run_grouped_component_tests(
|
||||
if component not in all_tests:
|
||||
continue
|
||||
|
||||
# Skip components that must be tested in isolation
|
||||
# These are shown separately and should not be in non_groupable_reasons
|
||||
if component in ISOLATED_COMPONENTS:
|
||||
continue
|
||||
|
||||
# Skip base bus components (these test the bus platforms themselves)
|
||||
if component in BASE_BUS_COMPONENTS:
|
||||
continue
|
||||
|
||||
# Skip components that use local file references or direct bus configs
|
||||
if component in non_groupable:
|
||||
# Track the reason (using pre-calculated results to avoid expensive re-analysis)
|
||||
@@ -391,13 +401,6 @@ def run_grouped_component_tests(
|
||||
)
|
||||
continue
|
||||
|
||||
# Skip components that must be tested in isolation
|
||||
if component in ISOLATED_COMPONENTS:
|
||||
non_groupable_reasons[component] = (
|
||||
f"Known build issue: {ISOLATED_COMPONENTS[component]}"
|
||||
)
|
||||
continue
|
||||
|
||||
for platform, buses in platforms.items():
|
||||
# Skip if platform doesn't match filter
|
||||
if platform_filter and not platform.startswith(platform_filter):
|
||||
@@ -428,6 +431,15 @@ def run_grouped_component_tests(
|
||||
reason = ISOLATED_COMPONENTS[comp]
|
||||
print(f" - {comp}: {reason}")
|
||||
|
||||
# Show base bus components (test the bus platform implementations)
|
||||
base_bus_in_tests = [c for c in BASE_BUS_COMPONENTS if c in all_tests]
|
||||
if base_bus_in_tests:
|
||||
print(
|
||||
f"\n○ {len(base_bus_in_tests)} base bus platform components (tested individually):"
|
||||
)
|
||||
for comp in sorted(base_bus_in_tests):
|
||||
print(f" - {comp}")
|
||||
|
||||
# Show excluded components with detailed reasons
|
||||
if non_groupable_reasons:
|
||||
excluded_in_tests = [c for c in non_groupable_reasons if c in all_tests]
|
||||
|
@@ -1,5 +1,6 @@
|
||||
sensor:
|
||||
- platform: gcja5
|
||||
uart_id: uart_bus
|
||||
pm_1_0:
|
||||
name: "Particulate Matter <1.0µm Concentration"
|
||||
pm_2_5:
|
||||
|
Reference in New Issue
Block a user