From 85240aef96e9ca4886d0f85af325309c06c89810 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 `rev_default` --- tools/ci/idf_pytest/constants.py | 9 +++++++++ tools/ci/idf_pytest/plugin.py | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/tools/ci/idf_pytest/constants.py b/tools/ci/idf_pytest/constants.py index 17f107258e..b148792b3c 100644 --- a/tools/ci/idf_pytest/constants.py +++ b/tools/ci/idf_pytest/constants.py @@ -151,6 +151,7 @@ ENV_MARKERS = { 'recovery_bootloader': 'Runner with recovery bootloader offset set in eFuse', 'esp32p4_eco4': 'Runner with esp32p4 eco4 connected', 'esp32c5_eco3': 'Runner with esp32c5 eco3 connected', + 'rev_default': 'Runner with default revision connected', } # by default the timeout is 1h, for some special cases we need to extend it @@ -363,3 +364,11 @@ class PytestCase: msg += '\nMight be a issue of .build-test-rules.yml files' print(msg) return msg + + +ECO_MARKERS = [ + 'esp32eco3', + 'esp32c2eco4', + 'esp32c3eco7', + 'esp32p4_eco4', +] diff --git a/tools/ci/idf_pytest/plugin.py b/tools/ci/idf_pytest/plugin.py index c74313ac84..43113271e4 100644 --- a/tools/ci/idf_pytest/plugin.py +++ b/tools/ci/idf_pytest/plugin.py @@ -26,6 +26,7 @@ from pytest_ignore_test_results.ignore_results import ChildCase from pytest_ignore_test_results.ignore_results import ChildCasesStashKey from .constants import DEFAULT_SDKCONFIG +from .constants import ECO_MARKERS from .constants import PREVIEW_TARGETS from .constants import SUPPORTED_TARGETS from .constants import CollectMode @@ -318,6 +319,12 @@ class IdfPytestEmbedded: if 'esp32c2' in self.target and '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('rev_default') + def pytest_report_collectionfinish(self, items: t.List[Function]) -> None: self.cases = [item.stash[ITEM_PYTEST_CASE_KEY] for item in items]