Skip to content

Commit 55870f3

Browse files
committed
ci: fix build script when no test script found
1 parent e1149f0 commit 55870f3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/ci/idf_ci_utils.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,18 @@ def get_pytest_cases(
248248
# collect all cases
249249
os.environ['INCLUDE_NIGHTLY_RUN'] = '1'
250250

251-
cases = []
251+
cases = [] # type: List[PytestCase]
252+
pytest_scripts = get_pytest_files(paths)
253+
if not pytest_scripts:
254+
print(f'WARNING: no pytest scripts found for target {target} under paths {", ".join(paths)}')
255+
return cases
256+
252257
for target in targets:
253258
collector = PytestCollectPlugin(target)
254259

255260
with io.StringIO() as buf:
256261
with redirect_stdout(buf):
257-
cmd = ['--collect-only', *get_pytest_files(paths), '--target', target, '-q']
262+
cmd = ['--collect-only', *pytest_scripts, '--target', target, '-q']
258263
if marker_expr:
259264
cmd.extend(['-m', marker_expr])
260265
if filter_expr:

0 commit comments

Comments
 (0)