mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 12:06:08 +00:00
fw/exec: context: add write_output()
Add a convenience method for invoking write_info(), write_state(), and write_result() of run_output. This will make it easier to call it from multiple places.
This commit is contained in:
parent
1b498fa42d
commit
861dff75d4
@ -132,9 +132,7 @@ class ExecutionContext(object):
|
||||
self.run_output.info.end_time = datetime.utcnow()
|
||||
self.run_output.info.duration = self.run_output.info.end_time -\
|
||||
self.run_output.info.start_time
|
||||
self.run_output.write_info()
|
||||
self.run_output.write_state()
|
||||
self.run_output.write_result()
|
||||
self.write_output()
|
||||
|
||||
def finalize(self):
|
||||
self.tm.finalize()
|
||||
@ -185,6 +183,11 @@ class ExecutionContext(object):
|
||||
def write_state(self):
|
||||
self.run_output.write_state()
|
||||
|
||||
def write_output(self):
|
||||
self.run_output.write_info()
|
||||
self.run_output.write_state()
|
||||
self.run_output.write_result()
|
||||
|
||||
def get_resource(self, resource, strict=True):
|
||||
result = self.resolver.get(resource, strict)
|
||||
if result is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user