1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21:17 +00:00

framework/job: do not extract workload results on failure

Now that job output processing happens even on failure, this will result
in workload result processing also being triggered. We should not try to
extract failed workload results, so check the job status before
attempting to do so.
This commit is contained in:
Sergei Trofimov 2017-11-24 08:29:45 +00:00 committed by marcbonnici
parent 45d8be5228
commit 9a15b82997

View File

@ -82,11 +82,12 @@ class Job(object):
def process_output(self, context):
self.logger.info('Processing output for job {} [{}]'.format(self.id, self.iteration))
with signal.wrap('WORKLOAD_RESULT_EXTRACTION', self, context):
self.workload.extract_results(context)
context.extract_results()
with signal.wrap('WORKLOAD_OUTPUT_UPDATE', self, context):
self.workload.update_output(context)
if self.status != Status.FAILED:
with signal.wrap('WORKLOAD_RESULT_EXTRACTION', self, context):
self.workload.extract_results(context)
context.extract_results()
with signal.wrap('WORKLOAD_OUTPUT_UPDATE', self, context):
self.workload.update_output(context)
def teardown(self, context):
self.logger.info('Tearing down job {} [{}]'.format(self.id, self.iteration))