1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 02:41:11 +01:00

fw/job: add missing log indents

Add "with indentcontext():" to Job stages that were missing them.
This commit is contained in:
Sergei Trofimov 2018-05-24 17:35:06 +01:00 committed by Marc Bonnici
parent a32e7e7bc7
commit 23946620d6

View File

@ -108,21 +108,24 @@ class Job(object):
def configure_target(self, context): def configure_target(self, context):
self.logger.info('Configuring target for job {}'.format(self)) self.logger.info('Configuring target for job {}'.format(self))
context.tm.commit_runtime_parameters(self.spec.runtime_parameters) with indentcontext():
context.tm.commit_runtime_parameters(self.spec.runtime_parameters)
def setup(self, context): def setup(self, context):
self.logger.info('Setting up job {}'.format(self)) self.logger.info('Setting up job {}'.format(self))
with signal.wrap('WORKLOAD_SETUP', self, context): with indentcontext():
self.workload.setup(context) with signal.wrap('WORKLOAD_SETUP', self, context):
self.workload.setup(context)
def run(self, context): def run(self, context):
self.logger.info('Running job {}'.format(self)) self.logger.info('Running job {}'.format(self))
with signal.wrap('WORKLOAD_EXECUTION', self, context): with indentcontext():
start_time = datetime.utcnow() with signal.wrap('WORKLOAD_EXECUTION', self, context):
try: start_time = datetime.utcnow()
self.workload.run(context) try:
finally: self.workload.run(context)
self.run_time = datetime.utcnow() - start_time finally:
self.run_time = datetime.utcnow() - start_time
def process_output(self, context): def process_output(self, context):
if not context.tm.is_responsive: if not context.tm.is_responsive: