Skip to content

Commit 68d021f

Browse files
committed
ci: introduce default marker eco_default
1 parent d7530b6 commit 68d021f

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,4 @@ env_markers =
131131
esp32c2eco4: esp32c2 major version(v2.0) chips
132132
recovery_bootloader: Runner with recovery bootloader offset set in
133133
esp32p4_eco4: Runner with esp32p4 eco4 connected
134+
eco_default: Runner with default eco connected

tools/ci/idf_pytest/constants.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
Pytest Related Constants. Don't import third-party packages here.
55
"""
66

7-
import typing as t
8-
97
SUPPORTED_TARGETS = [
108
'esp32',
119
'esp32s2',
@@ -18,11 +16,18 @@
1816
'esp32c5',
1917
'esp32c61',
2018
]
21-
PREVIEW_TARGETS: t.List[str] = [] # this PREVIEW_TARGETS excludes 'linux' target
19+
PREVIEW_TARGETS: list[str] = [] # this PREVIEW_TARGETS excludes 'linux' target
2220

2321
DEFAULT_LOGDIR = 'pytest-embedded'
2422

2523
# by default the timeout is 1h, for some special cases we need to extend it
2624
TIMEOUT_4H_MARKERS = [
2725
'ethernet_stress',
2826
]
27+
28+
ECO_MARKERS = [
29+
'esp32eco3',
30+
'esp32c2eco4',
31+
'esp32c3eco7',
32+
'esp32p4_eco4',
33+
]

tools/ci/idf_pytest/plugin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from pytest_ignore_test_results.ignore_results import ChildCase
2121
from pytest_ignore_test_results.ignore_results import ChildCasesStashKey
2222

23+
from .constants import ECO_MARKERS
2324
from .utils import format_case_id
2425
from .utils import merge_junit_files
2526
from .utils import normalize_testcase_file_path
@@ -164,6 +165,12 @@ def pytest_collection_modifyitems(self, config: Config, items: list[Function]) -
164165
if 'esp32c2' in case.targets and 'xtal_26mhz' not in case.all_markers:
165166
item.add_marker('xtal_40mhz')
166167

168+
for eco_marker in ECO_MARKERS:
169+
if eco_marker in case.all_markers:
170+
break
171+
else:
172+
item.add_marker('eco_default')
173+
167174
if 'host_test' in case.all_markers:
168175
item.add_marker('skip_app_downloader') # host_test jobs will build the apps itself
169176

0 commit comments

Comments
 (0)