zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.67k stars 6.52k forks source link

twister: regression : Failures are counted as errors #47702

Closed tpennors closed 2 years ago

tpennors commented 2 years ago

Describe the bug Failures are counted as errors. Must be a regression because it was working well before

To Reproduce Steps to reproduce the behavior:

  1. Create a build error in zephyr/samples/hello_world/main.c
  2. run ./scripts/twister -T samples/hello_world/ -p b_u585i_iot02a
  3. See error: twister_error

Impact The big problem is that as failure and error are inverted, twister return code is not 1 when failure occurs so CI does not pass in failure. As it can be seen in twister script:

if results.failed or (tplan.warnings and options.warnings_as_errors):
        sys.exit(1)

Environment (please complete the following information):

nashif commented 2 years ago

backport fix available, this is 3.1 specific.

nashif commented 2 years ago

https://github.com/zephyrproject-rtos/zephyr/pull/47703 merged