Skip to content

Commit 94b316e

Browse files
committed
ci: testplan: limit test scope on global changes
When doing global changes, like typo fixes or header changes, keep default scope and do not build each test for each platform. Signed-off-by: Anas Nashif <[email protected]>
1 parent d87552a commit 94b316e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scripts/ci/test_plan.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ def find_boards(self):
172172
all_boards.add(kb.name)
173173

174174
_options = []
175+
if len(all_boards) > 20:
176+
logging.warning(f"{len(boards)} boards changed, this looks like a global change, skipping test handling")
177+
return
178+
175179
for board in all_boards:
176180
_options.extend(["-p", board ])
177181

@@ -197,8 +201,12 @@ def find_tests(self):
197201
for t in tests:
198202
_options.extend(["-T", t ])
199203

204+
if len(tests) > 20:
205+
logging.warning(f"{len(tests)} tests changed, this looks like a global change, skipping test handling")
206+
return
207+
200208
if _options:
201-
logging.info(f'Potential test filters...')
209+
logging.info(f'Potential test filters...({len(tests)} changed...)')
202210
if self.platforms:
203211
for platform in self.platforms:
204212
_options.extend(["-p", platform])

0 commit comments

Comments
 (0)