diff options
author | Sergei Trofimov <sergei.trofimov@arm.com> | 2018-02-22 09:11:27 +0000 |
---|---|---|
committer | setrofim <setrofim@gmail.com> | 2018-02-22 11:20:35 +0000 |
commit | cec3eaa3751248664b641790959b01c9e83e4f4e (patch) | |
tree | 1901c7c6a75fbeea7e2edeb7db4961ab66b28342 | |
parent | 60fbd17fab72d66e0ae84396f63864226d9b8979 (diff) |
framework/execution: fix end_run() on crash
ExecutionContext.end_run() does final updates to the run info in the run
output (final status, run duration, etc). This was previously accessed
via self.output in the context. Typically, this would correctly resolve
to the run output, as there would be no current job. However, in the
event of a crash, current_job would be set, and this would resolve to
the job output itself, resulting in run info not being updated. Use
run_output to avoid this.
-rw-r--r-- | wa/framework/execution.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/wa/framework/execution.py b/wa/framework/execution.py index 10a8c548..04b85730 100644 --- a/wa/framework/execution.py +++ b/wa/framework/execution.py @@ -116,13 +116,13 @@ class ExecutionContext(object): else: status = Status.FAILED self.run_state.status = status - self.output.status = status - self.output.info.end_time = datetime.utcnow() - self.output.info.duration = self.output.info.end_time -\ - self.output.info.start_time - self.output.write_info() - self.output.write_state() - self.output.write_result() + self.run_output.status = status + self.run_output.info.end_time = datetime.utcnow() + self.run_output.info.duration = self.output.info.end_time -\ + self.output.info.start_time + self.run_output.write_info() + self.run_output.write_state() + self.run_output.write_result() def finalize(self): self.tm.finalize() |