diff --git a/wlauto/workloads/apklaunch/__init__.py b/wlauto/workloads/apklaunch/__init__.py index 67d614f0..ce13d197 100644 --- a/wlauto/workloads/apklaunch/__init__.py +++ b/wlauto/workloads/apklaunch/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # - +# pylint: disable=attribute-defined-outside-init import os from time import sleep diff --git a/wlauto/workloads/applaunch/__init__.py b/wlauto/workloads/applaunch/__init__.py index 3dec6108..00ac999d 100644 --- a/wlauto/workloads/applaunch/__init__.py +++ b/wlauto/workloads/applaunch/__init__.py @@ -125,7 +125,7 @@ class ApplaunchWorkload(Workload): def run(self, context): self.device.execute('sh {}'.format(self.device_script_file), timeout=300, as_root=self.io_stress) - def update_result(self, context): + def update_result(self, context): # pylint: disable=too-many-locals result_files = ['time.result'] result_files += ['{}.result'.format(sensor.label) for sensor in self.sensors] metric_suffix = '' diff --git a/wlauto/workloads/geekbench/__init__.py b/wlauto/workloads/geekbench/__init__.py index 3ac6255a..119ecfde 100644 --- a/wlauto/workloads/geekbench/__init__.py +++ b/wlauto/workloads/geekbench/__init__.py @@ -94,6 +94,10 @@ class Geekbench(AndroidUiAutoBenchmark): self.uiauto_params['times'] = self.times self.run_timeout = 5 * 60 * self.times + def initialize(self, context): + if self.device.is_rooted: + raise WorkloadError('Geekbench workload only works on rooted devices.') + def init_resources(self, context): self.apk_file = context.resolver.get(wlauto.common.android.resources.ApkFile(self), version=self.version) self.uiauto_file = context.resolver.get(wlauto.common.android.resources.JarFile(self))