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