1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 12:06:08 +00:00

wa/output_processors: pylint fixes

This commit is contained in:
Marc Bonnici 2018-07-03 14:09:34 +01:00
parent 7f9737a844
commit 30471613de
6 changed files with 9 additions and 13 deletions

View File

@ -13,13 +13,11 @@
# limitations under the License.
#
import os
from collections import OrderedDict
from devlib.utils.csvutil import csvwriter
from wa import OutputProcessor, Parameter
from wa.utils.types import list_of_strings
from wa.utils.cpustates import report_power_stats
@ -90,7 +88,7 @@ class CpuStatesProcessor(OutputProcessor):
def initialize(self):
self.iteration_reports = OrderedDict()
def process_job_output(self, output, target_info, run_output):
def process_job_output(self, output, target_info, run_output): #pylint: disable=unused-argument
trace_file = output.get_artifact_path('trace-cmd-txt')
if not trace_file:
self.logger.warning('Text trace does not appear to have been generated; skipping this iteration.')
@ -112,6 +110,7 @@ class CpuStatesProcessor(OutputProcessor):
iteration_id = (output.id, output.label, output.iteration)
self.iteration_reports[iteration_id] = reports
#pylint: disable=too-many-locals,unused-argument
def process_run_output(self, output, target_info):
if not self.iteration_reports:
self.logger.warning('No power state reports generated.')

View File

@ -13,8 +13,6 @@
# limitations under the License.
#
import sys
from devlib.utils.csvutil import csvwriter
from wa import OutputProcessor, Parameter
@ -62,6 +60,7 @@ class CsvReportProcessor(OutputProcessor):
self.outputs_so_far = [] # pylint: disable=attribute-defined-outside-init
self.artifact_added = False
#pylint: disable=unused-argument
def process_job_output(self, output, target_info, run_output):
self.outputs_so_far.append(output)
self._write_outputs(self.outputs_so_far, run_output)
@ -69,7 +68,7 @@ class CsvReportProcessor(OutputProcessor):
run_output.add_artifact('run_result_csv', 'results.csv', 'export')
self.artifact_added = True
def process_run_output(self, output, target_info):
def process_run_output(self, output, target_info): #pylint: disable=unused-argument
self.outputs_so_far.append(output)
self._write_outputs(self.outputs_so_far, output)
if not self.artifact_added:

View File

@ -115,7 +115,7 @@ class SqliteResultProcessor(OutputProcessor):
self._spec_oid = None
self._run_initialized = False
def export_job_output(self, job_output, target_info, run_output):
def export_job_output(self, job_output, target_info, run_output): #pylint: disable=unused-argument
if not self._run_initialized:
self._init_run(run_output)
@ -128,7 +128,7 @@ class SqliteResultProcessor(OutputProcessor):
with self._open_connection() as conn:
conn.executemany('INSERT INTO metrics VALUES (?,?,?,?,?,?)', metrics)
def export_run_output(self, run_output, target_info):
def export_run_output(self, run_output, target_info): #pylint: disable=unused-argument
if not self._run_initialized:
self._init_run(run_output)

View File

@ -30,7 +30,7 @@ class StatusTxtReporter(OutputProcessor):
"""
def process_run_output(self, output, target_info):
def process_run_output(self, output, target_info): #pylint: disable=unused-argument
counter = Counter()
for jo in output.jobs:
counter[jo.status] += 1
@ -55,4 +55,3 @@ class StatusTxtReporter(OutputProcessor):
write_table(status_lines, wfh, align='<<>><')
output.add_artifact('run_status_summary', 'status.txt', 'export')

View File

@ -61,7 +61,7 @@ class TargzProcessor(OutputProcessor):
self.logger.debug('Registering RUN_FINALIZED handler.')
signal.connect(self.delete_output_directory, signal.RUN_FINALIZED, priority=-100)
def export_run_output(self, run_output, target_info):
def export_run_output(self, run_output, target_info): #pylint: disable=unused-argument
if self.outfile:
outfile_path = self.outfile.format(**run_output.info.to_pod())
else:
@ -74,5 +74,3 @@ class TargzProcessor(OutputProcessor):
def delete_output_directory(self, context):
self.logger.debug('Deleting output directory')
shutil.rmtree(context.run_output.basepath)

View File

@ -30,6 +30,7 @@ class UxperfProcessor(OutputProcessor):
a agenda file by setting ``markers_enabled`` for the workload to ``True``.
'''
#pylint: disable=too-many-locals,unused-argument
def process_job_output(self, output, target_info, job_output):
logcat = output.get_artifact('logcat')
if not logcat: