diff --git a/scripts/pylib/twister/twisterlib/runner.py b/scripts/pylib/twister/twisterlib/runner.py index 12f77df4c37df..ba182ccea19ab 100644 --- a/scripts/pylib/twister/twisterlib/runner.py +++ b/scripts/pylib/twister/twisterlib/runner.py @@ -614,6 +614,9 @@ def _add_to_pipeline(self, pipeline, op: str, additionals: dict={}): def process(self, pipeline, done, message, lock, results): + next_op = None + additionals = {} + op = message.get('op') self.instance.setup_handler(self.env) @@ -771,8 +774,6 @@ def process(self, pipeline, done, message, lock, results): done.put(self.instance) self.report_out(results) - next_op = None - additionals = {} if not self.options.coverage: if self.options.prep_artifacts_for_testing: next_op = 'cleanup'