From 890428dbf67127a91588168675fde9339bcbab50 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Wed, 11 Oct 2017 17:24:09 +0100 Subject: [PATCH] framework/execution: fix end of run status reporting Changes to the Status enum introduced by 31a535b5 and a9959550 broke ran Jobs summary status at the end of the run. This fixes it so that the total number of jobs and individual status counts are reported correctly. --- wa/framework/execution.py | 2 +- wa/framework/run.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wa/framework/execution.py b/wa/framework/execution.py index 4cf7c950..159957ea 100644 --- a/wa/framework/execution.py +++ b/wa/framework/execution.py @@ -312,7 +312,7 @@ class Executor(object): counter = context.run_state.get_status_counts() parts = [] - for status in reversed(Status.values): + for status in reversed(Status.levels): if status in counter: parts.append('{} {}'.format(counter[status], status)) self.logger.info(status_summary + ', '.join(parts)) diff --git a/wa/framework/run.py b/wa/framework/run.py index aefd52f4..5b9f577a 100644 --- a/wa/framework/run.py +++ b/wa/framework/run.py @@ -76,7 +76,7 @@ class RunState(object): @property def num_completed_jobs(self): return sum(1 for js in self.jobs.itervalues() - if js.status > Status.SKIPPED) + if js.status > Status.RUNNING) def __init__(self): self.jobs = OrderedDict()