Skip to content

Commit ab85534

Browse files
author
igor.udot
committed
ci: fix temp_skip_ci issue where test job was not skipped
1 parent 4324c48 commit ab85534

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tools/ci/idf_pytest/plugin.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,22 @@ def _get_temp_markers_disabled_targets(marker_name: str) -> t.Set[str]:
6565

6666
return set(to_list(temp_marker.kwargs['targets']))
6767

68-
temp_skip_ci_targets = _get_temp_markers_disabled_targets('temp_skip_ci')
69-
temp_skip_targets = _get_temp_markers_disabled_targets('temp_skip')
68+
_count = IdfLocalPlugin.get_param(item, 'count', 1)
69+
70+
def normalize_targets(target: str) -> str:
71+
targets = target.split(',')
72+
if len(targets) == 1:
73+
return ','.join(targets * _count)
74+
if len(targets) != _count:
75+
raise ValueError(
76+
f"Invalid target format: '{target}'. "
77+
f'Expected a single target or exactly {_count} values separated by commas.'
78+
f'len({targets}) != {_count}'
79+
)
80+
return target
81+
82+
temp_skip_ci_targets = set(normalize_targets(_t) for _t in _get_temp_markers_disabled_targets('temp_skip_ci'))
83+
temp_skip_targets = set(normalize_targets(_t) for _t in _get_temp_markers_disabled_targets('temp_skip'))
7084

7185
# in CI we skip the union of `temp_skip` and `temp_skip_ci`
7286
if os.getenv('CI_JOB_ID'):

0 commit comments

Comments
 (0)