mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
wa/workloads: pep8 fixes
This commit is contained in:
parent
185bff9029
commit
6e94cbd36b
@ -69,6 +69,7 @@ class AdobeReader(ApkUiautoWorkload):
|
||||
self.asset_directory = self.target.path.join(self.target.external_storage,
|
||||
'Android', 'data',
|
||||
'com.adobe.reader', 'files')
|
||||
|
||||
def init_resources(self, context):
|
||||
super(AdobeReader, self).init_resources(context)
|
||||
# Only accept certain file formats
|
||||
|
@ -17,6 +17,7 @@ import re
|
||||
from wa import ApkUiautoWorkload
|
||||
from wa.framework.exception import WorkloadError
|
||||
|
||||
|
||||
class Androbench(ApkUiautoWorkload):
|
||||
|
||||
name = 'androbench'
|
||||
@ -52,5 +53,5 @@ class Androbench(ApkUiautoWorkload):
|
||||
context.add_metric(entry, result, 'MB/s', lower_is_better=False)
|
||||
expected_results -= 1
|
||||
if expected_results > 0:
|
||||
raise WorkloadError("The Androbench workload has failed. Expected {} scores, Detected {} scores."
|
||||
.format(len(self.regex_matches), expected_results))
|
||||
msg = "The Androbench workload has failed. Expected {} scores, Detected {} scores."
|
||||
raise WorkloadError(msg.format(len(self.regex_matches), expected_results))
|
||||
|
@ -16,6 +16,7 @@ import re
|
||||
|
||||
from wa import ApkUiautoWorkload, WorkloadError
|
||||
|
||||
|
||||
class Antutu(ApkUiautoWorkload):
|
||||
|
||||
name = 'antutu'
|
||||
|
@ -89,7 +89,6 @@ class ApacheBenchmark(Workload):
|
||||
self.path)
|
||||
self.output = None
|
||||
|
||||
|
||||
def run(self, context):
|
||||
self.logger.debug(self.command)
|
||||
self.output, _ = check_output(self.command, timeout=300, shell=True)
|
||||
|
@ -18,7 +18,6 @@ from wa import ApkUiautoWorkload, Parameter
|
||||
from wa.framework import pluginloader
|
||||
|
||||
|
||||
|
||||
class Applaunch(ApkUiautoWorkload):
|
||||
|
||||
name = 'applaunch'
|
||||
|
@ -24,6 +24,7 @@ from wa import ApkUiautoWorkload, Parameter
|
||||
from wa.framework.exception import ConfigError, WorkloadError
|
||||
from wa.utils.misc import capitalize
|
||||
|
||||
|
||||
class Geekbench(ApkUiautoWorkload):
|
||||
|
||||
name = 'geekbench'
|
||||
@ -196,6 +197,7 @@ class Geekbench(ApkUiautoWorkload):
|
||||
|
||||
update_result_5 = update_result_4
|
||||
|
||||
|
||||
class GBWorkload(object):
|
||||
"""
|
||||
Geekbench workload (not to be confused with WA's workloads). This is a single test run by
|
||||
@ -403,6 +405,7 @@ class GeekbenchCorproate(Geekbench):
|
||||
override=True)
|
||||
]
|
||||
|
||||
|
||||
def namemify(basename, i):
|
||||
return basename + (' {}'.format(i) if i else '')
|
||||
|
||||
|
@ -60,7 +60,6 @@ class HWUITest(Workload):
|
||||
super(HWUITest, self).__init__(target, *args, **kwargs)
|
||||
HWUITest.target_exe = None
|
||||
|
||||
|
||||
@once
|
||||
def initialize(self, context):
|
||||
host_exe = context.get_resource(Executable(self,
|
||||
|
@ -61,6 +61,7 @@ class Memcpy(Workload):
|
||||
cores will be used.
|
||||
'''),
|
||||
]
|
||||
|
||||
@once
|
||||
def initialize(self, context):
|
||||
self.binary_name = 'memcpy'
|
||||
|
@ -19,6 +19,7 @@ import zipfile
|
||||
from wa import ApkUiautoWorkload
|
||||
from wa.framework.exception import WorkloadError
|
||||
|
||||
|
||||
class PcMark(ApkUiautoWorkload):
|
||||
|
||||
name = 'pcmark'
|
||||
|
@ -65,7 +65,6 @@ class Vellamo(ApkUiautoWorkload):
|
||||
'listed, ``2`` -- the second, etc. Only valid for version ``3.0``.'))
|
||||
]
|
||||
|
||||
|
||||
def setup(self, context):
|
||||
self.gui.uiauto_params['version'] = self.version
|
||||
self.gui.uiauto_params['browserToUse'] = self.browser
|
||||
|
Loading…
x
Reference in New Issue
Block a user