Skip to content

Commit

Permalink
twister: No skips for integration platforms in integration mode
Browse files Browse the repository at this point in the history
All skips for platforms listed in the .yaml's integration_platforms
will be treated as errors in the integration mode ('-G/--integration').
This feature serves to guarantee a proper testing scope in CI as no
integration platform will be skipped silently.
Fixes #33874

Signed-off-by: Maciej Perkowski <[email protected]>
  • Loading branch information
PerMac authored and carlescufi committed Apr 22, 2021
1 parent 043891e commit d08ee92
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions scripts/pylib/twister/twisterlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3256,8 +3256,16 @@ def apply_filters(self, **kwargs):

for instance in self.discards:
instance.reason = self.discards[instance]
instance.status = "skipped"
instance.fill_results_by_status()
# If integration mode is on all skips on integration_platforms are treated as errors.
# TODO: add quarantine relief here when PR with quarantine feature gets merged
if self.integration and instance.platform.name in instance.testcase.integration_platforms:
instance.status = "error"
instance.reason += " but is one of the integration platforms"
instance.fill_results_by_status()
self.instances[instance.name] = instance
else:
instance.status = "skipped"
instance.fill_results_by_status()

self.filtered_platforms = set(p.platform.name for p in self.instances.values()
if p.status != "skipped" )
Expand Down Expand Up @@ -3295,6 +3303,9 @@ def add_tasks_to_queue(self, pipeline, build_only=False, test_only=False):
logger.debug(f"adding {instance.name}")
instance.status = None
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})

def pipeline_mgr(self, pipeline, done_queue, lock, results):
while True:
Expand Down

0 comments on commit d08ee92

Please sign in to comment.