From 68d021f09c914eefd3629ee2f45c3d80c4b117cf Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 26 Nov 2025 13:15:39 +0100 Subject: [PATCH] ci: introduce default marker `eco_default` --- pytest.ini | 1 + tools/ci/idf_pytest/constants.py | 11 ++++++++--- tools/ci/idf_pytest/plugin.py | 7 +++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pytest.ini b/pytest.ini index 3ebb50c851..f8e4fdd910 100644 --- a/pytest.ini +++ b/pytest.ini @@ -131,3 +131,4 @@ env_markers = esp32c2eco4: esp32c2 major version(v2.0) chips recovery_bootloader: Runner with recovery bootloader offset set in esp32p4_eco4: Runner with esp32p4 eco4 connected + eco_default: Runner with default eco connected diff --git a/tools/ci/idf_pytest/constants.py b/tools/ci/idf_pytest/constants.py index b7877a23df..0c3542d9d9 100644 --- a/tools/ci/idf_pytest/constants.py +++ b/tools/ci/idf_pytest/constants.py @@ -4,8 +4,6 @@ Pytest Related Constants. Don't import third-party packages here. """ -import typing as t - SUPPORTED_TARGETS = [ 'esp32', 'esp32s2', @@ -18,7 +16,7 @@ SUPPORTED_TARGETS = [ 'esp32c5', 'esp32c61', ] -PREVIEW_TARGETS: t.List[str] = [] # this PREVIEW_TARGETS excludes 'linux' target +PREVIEW_TARGETS: list[str] = [] # this PREVIEW_TARGETS excludes 'linux' target DEFAULT_LOGDIR = 'pytest-embedded' @@ -26,3 +24,10 @@ DEFAULT_LOGDIR = 'pytest-embedded' TIMEOUT_4H_MARKERS = [ 'ethernet_stress', ] + +ECO_MARKERS = [ + 'esp32eco3', + 'esp32c2eco4', + 'esp32c3eco7', + 'esp32p4_eco4', +] diff --git a/tools/ci/idf_pytest/plugin.py b/tools/ci/idf_pytest/plugin.py index cfa8d8ffcf..b86f8823f2 100644 --- a/tools/ci/idf_pytest/plugin.py +++ b/tools/ci/idf_pytest/plugin.py @@ -20,6 +20,7 @@ from pytest_embedded.utils import find_by_suffix from pytest_ignore_test_results.ignore_results import ChildCase from pytest_ignore_test_results.ignore_results import ChildCasesStashKey +from .constants import ECO_MARKERS from .utils import format_case_id from .utils import merge_junit_files from .utils import normalize_testcase_file_path @@ -164,6 +165,12 @@ class IdfLocalPlugin: if 'esp32c2' in case.targets and 'xtal_26mhz' not in case.all_markers: item.add_marker('xtal_40mhz') + for eco_marker in ECO_MARKERS: + if eco_marker in case.all_markers: + break + else: + item.add_marker('eco_default') + if 'host_test' in case.all_markers: item.add_marker('skip_app_downloader') # host_test jobs will build the apps itself