mirror of
https://github.com/esphome/esphome.git
synced 2025-10-25 21:23:53 +01:00
[ci] Fix WiFi testing mode validation and component splitter for variant-only tests (#11481)
This commit is contained in:
@@ -213,11 +213,15 @@ def _validate(config):
|
||||
if CONF_EAP in config:
|
||||
network[CONF_EAP] = config.pop(CONF_EAP)
|
||||
if CONF_NETWORKS in config:
|
||||
raise cv.Invalid(
|
||||
"You cannot use the 'ssid:' option together with 'networks:'. Please "
|
||||
"copy your network into the 'networks:' key"
|
||||
)
|
||||
config[CONF_NETWORKS] = cv.ensure_list(WIFI_NETWORK_STA)(network)
|
||||
# In testing mode, merged component tests may have both ssid and networks
|
||||
# Just use the networks list and ignore the single ssid
|
||||
if not CORE.testing_mode:
|
||||
raise cv.Invalid(
|
||||
"You cannot use the 'ssid:' option together with 'networks:'. Please "
|
||||
"copy your network into the 'networks:' key"
|
||||
)
|
||||
else:
|
||||
config[CONF_NETWORKS] = cv.ensure_list(WIFI_NETWORK_STA)(network)
|
||||
|
||||
if (CONF_NETWORKS not in config) and (CONF_AP not in config):
|
||||
config = config.copy()
|
||||
|
||||
@@ -118,8 +118,13 @@ def create_intelligent_batches(
|
||||
continue
|
||||
|
||||
# Get signature from any platform (they should all have the same buses)
|
||||
# Components not in component_buses were filtered out by has_test_files check
|
||||
comp_platforms = component_buses[component]
|
||||
# Components not in component_buses may only have variant-specific tests
|
||||
comp_platforms = component_buses.get(component)
|
||||
if not comp_platforms:
|
||||
# Component has tests but no analyzable base config - treat as no buses
|
||||
signature_groups[(ALL_PLATFORMS, NO_BUSES_SIGNATURE)].append(component)
|
||||
continue
|
||||
|
||||
for platform, buses in comp_platforms.items():
|
||||
if buses:
|
||||
signature = create_grouping_signature({platform: buses}, platform)
|
||||
|
||||
Reference in New Issue
Block a user