fix: twister: quit-on-failure
use public queue methods to clear queue on failure -s Felix Behnke felixbeiderarbeit@gmail.com Signed-off-by: Felix Behnke <felixbeiderarbeit@gmail.com>
This commit is contained in:
parent
013f6f4039
commit
a045eaebad
1 changed files with 10 additions and 6 deletions
|
@ -2003,9 +2003,11 @@ class TwisterRunner:
|
|||
pb.process(pipeline, done_queue, task, lock, results)
|
||||
if self.env.options.quit_on_failure and \
|
||||
pb.instance.status in [TwisterStatus.FAIL, TwisterStatus.ERROR]:
|
||||
with pipeline.mutex:
|
||||
pipeline.queue.clear()
|
||||
break
|
||||
try:
|
||||
while True:
|
||||
pipeline.get_nowait()
|
||||
except queue.Empty:
|
||||
pass
|
||||
|
||||
return True
|
||||
else:
|
||||
|
@ -2021,9 +2023,11 @@ class TwisterRunner:
|
|||
pb.process(pipeline, done_queue, task, lock, results)
|
||||
if self.env.options.quit_on_failure and \
|
||||
pb.instance.status in [TwisterStatus.FAIL, TwisterStatus.ERROR]:
|
||||
with pipeline.mutex:
|
||||
pipeline.queue.clear()
|
||||
break
|
||||
try:
|
||||
while True:
|
||||
pipeline.get_nowait()
|
||||
except queue.Empty:
|
||||
pass
|
||||
return True
|
||||
except Exception as e:
|
||||
logger.error(f"General exception: {e}\n{traceback.format_exc()}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue