From 5aae70517215e42b920a57e949bdbc85521cf2bf Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Fri, 21 Aug 2015 09:37:53 +0100 Subject: [PATCH] androbench: added early check for root on device; updated description with link to website. --- wlauto/workloads/androbench/__init__.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/wlauto/workloads/androbench/__init__.py b/wlauto/workloads/androbench/__init__.py index 861fe45a..1985ea48 100644 --- a/wlauto/workloads/androbench/__init__.py +++ b/wlauto/workloads/androbench/__init__.py @@ -13,19 +13,28 @@ # limitations under the License. # - import os import sqlite3 + from wlauto import AndroidUiAutoBenchmark +from wlauto.exceptions import WorkloadError class Androbench(AndroidUiAutoBenchmark): name = 'androbench' - description = """Androbench measures the storage performance of device""" + description = """ + Measures the storage performance of an Android device. + + Website: http://www.androbench.org/wiki/AndroBench + """ package = 'com.andromeda.androbench2' activity = '.main' run_timeout = 10 * 60 + def initialize(self, context): + if not self.device.is_rooted: + raise WorkloadError('Androbench workload only works on rooted devices.') + def update_result(self, context): super(Androbench, self).update_result(context) dbn = 'databases/history.db'