analyze_outcomes: fix return value in case of test failure

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti 2023-10-17 12:23:55 +02:00
parent 40314fcc75
commit 8d178be66e

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Analyze the test outcomes from a full CI run. """Analyze the test outcomes from a full CI run.
@ -694,7 +694,7 @@ def main():
"{} warnings | ".format(main_results.warning_count) + \ "{} warnings | ".format(main_results.warning_count) + \
"{} errors".format(main_results.error_count)) "{} errors".format(main_results.error_count))
sys.exit(0 if (main_results.error_count == 0) else 2) sys.exit(0 if (main_results.error_count == 0) else 1)
except Exception: # pylint: disable=broad-except except Exception: # pylint: disable=broad-except
# Print the backtrace and exit explicitly with our chosen status. # Print the backtrace and exit explicitly with our chosen status.