Skip to content

Commit

Permalink
Merge branch 'fix/idf_ci_script' into 'master'
Browse files Browse the repository at this point in the history
fix(ci): Move error handling to correct scope

See merge request espressif/esp-idf!25777
  • Loading branch information
euripedesrocha committed Sep 13, 2023
2 parents 11bbe9c + f68c94d commit d913418
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/ci/idf_pytest/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ def get_pytest_cases(
cmd.extend(['-k', filter_expr])
res = pytest.main(cmd, plugins=[collector])

if res.value != ExitCode.OK:
if res.value == ExitCode.NO_TESTS_COLLECTED:
print(f'WARNING: no pytest app found for target {target} under paths {", ".join(paths)}')
else:
print(buf.getvalue())
raise RuntimeError(f'pytest collection failed at {", ".join(paths)} with command \"{" ".join(cmd)}\"')
if res.value != ExitCode.OK:
if res.value == ExitCode.NO_TESTS_COLLECTED:
print(f'WARNING: no pytest app found for target {target} under paths {", ".join(paths)}')
else:
print(buf.getvalue())
raise RuntimeError(f'pytest collection failed at {", ".join(paths)} with command \"{" ".join(cmd)}\"')

cases.extend(collector.cases)

Expand Down

0 comments on commit d913418

Please sign in to comment.