in mozci/task.py [0:0]
def status(self):
overall_status_by_label = {}
for task in self.tasks:
for result in task.results:
if result.group != self.name:
continue
if not result.ok:
status = Status.FAIL
else:
status = Status.PASS
if task.label not in overall_status_by_label:
overall_status_by_label[task.label] = status
elif status != overall_status_by_label[task.label]:
overall_status_by_label[task.label] = Status.INTERMITTENT
# If the manifest failed intermittently at least in one task, we
# consider it to be intermittent.
if any(
status == Status.INTERMITTENT for status in overall_status_by_label.values()
):
return Status.INTERMITTENT
# Otherwise, if the manifest failed at least once in any of the tasks,
# we consider it as a failure.
if any(status == Status.FAIL for status in overall_status_by_label.values()):
return Status.FAIL
# Otherwise, the manifest passed in all tasks, so we consider it a pass.
return Status.PASS