twister: Fix bug re-running all tests when using test-only
When using both test-only and retry-failed flags, all tests would be added to the test queue regardless if they failed or not. This commit updates the logic to process test-only runs similar as other runs, by adding tests to the queue with the 'run' operation directly. Signed-off-by: Andreas Vibeto <andreas.vibeto@nordicsemi.no>
This commit is contained in:
parent
73205d1ffb
commit
32fbf8e414
1 changed files with 9 additions and 9 deletions
|
@ -3310,16 +3310,16 @@ class TestSuite(DisablePyTestCollectionMixin):
|
|||
if build_only:
|
||||
instance.run = False
|
||||
|
||||
if test_only and instance.run:
|
||||
pipeline.put({"op": "run", "test": instance})
|
||||
else:
|
||||
if instance.status not in ['passed', 'skipped', 'error']:
|
||||
logger.debug(f"adding {instance.name}")
|
||||
instance.status = None
|
||||
if instance.status not in ['passed', 'skipped', 'error']:
|
||||
logger.debug(f"adding {instance.name}")
|
||||
instance.status = None
|
||||
if test_only and instance.run:
|
||||
pipeline.put({"op": "run", "test": instance})
|
||||
else:
|
||||
pipeline.put({"op": "cmake", "test": instance})
|
||||
# If the instance got 'error' status before, proceed to the report stage
|
||||
if instance.status == "error":
|
||||
pipeline.put({"op": "report", "test": instance})
|
||||
# If the instance got 'error' status before, proceed to the report stage
|
||||
if instance.status == "error":
|
||||
pipeline.put({"op": "report", "test": instance})
|
||||
|
||||
def pipeline_mgr(self, pipeline, done_queue, lock, results):
|
||||
while True:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue