twister: Exit with a bad status if there were build errors

Previously, twister would exit with a 0 status code if there were build
failures but no execution failures. This makes it easier to catch
build breakages when using twister in CI workflows.

Signed-off-by: Benjamin Gwin <bgwin@google.com>
This commit is contained in:
Benjamin Gwin 2022-06-14 16:54:32 -07:00 committed by Anas Nashif
commit 3f8d5c49b3

View file

@ -1374,7 +1374,7 @@ def main():
)
logger.info("Run completed")
if results.failed or (tplan.warnings and options.warnings_as_errors):
if results.failed or results.error or (tplan.warnings and options.warnings_as_errors):
sys.exit(1)