mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
ci: fix build script when no test script found
This commit is contained in:
@ -248,13 +248,18 @@ def get_pytest_cases(
|
|||||||
# collect all cases
|
# collect all cases
|
||||||
os.environ['INCLUDE_NIGHTLY_RUN'] = '1'
|
os.environ['INCLUDE_NIGHTLY_RUN'] = '1'
|
||||||
|
|
||||||
cases = []
|
cases = [] # type: List[PytestCase]
|
||||||
|
pytest_scripts = get_pytest_files(paths)
|
||||||
|
if not pytest_scripts:
|
||||||
|
print(f'WARNING: no pytest scripts found for target {target} under paths {", ".join(paths)}')
|
||||||
|
return cases
|
||||||
|
|
||||||
for target in targets:
|
for target in targets:
|
||||||
collector = PytestCollectPlugin(target)
|
collector = PytestCollectPlugin(target)
|
||||||
|
|
||||||
with io.StringIO() as buf:
|
with io.StringIO() as buf:
|
||||||
with redirect_stdout(buf):
|
with redirect_stdout(buf):
|
||||||
cmd = ['--collect-only', *get_pytest_files(paths), '--target', target, '-q']
|
cmd = ['--collect-only', *pytest_scripts, '--target', target, '-q']
|
||||||
if marker_expr:
|
if marker_expr:
|
||||||
cmd.extend(['-m', marker_expr])
|
cmd.extend(['-m', marker_expr])
|
||||||
if filter_expr:
|
if filter_expr:
|
||||||
|
Reference in New Issue
Block a user