From a08d6262ba93ba1b23c0966ce629a9f899e8db4e Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Wed, 25 Oct 2017 19:15:46 +0100 Subject: [PATCH 1/2] geekbench: Use root to pull results XML file This is required, I don't know why this was working before. Maybe only tested after people had run 'adb root'? --- wa/workloads/geekbench/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wa/workloads/geekbench/__init__.py b/wa/workloads/geekbench/__init__.py index cdf8128a..5c3840a5 100644 --- a/wa/workloads/geekbench/__init__.py +++ b/wa/workloads/geekbench/__init__.py @@ -153,7 +153,7 @@ class Geekbench(ApkUiautoWorkload): as_root=True).split('\n') if f] for i, on_target_output_file in enumerate(on_target_output_files): host_temp_file = tempfile.mktemp() - self.target.pull(on_target_output_file, host_temp_file) + self.target.pull(on_target_output_file, host_temp_file, as_root=True) host_output_file = os.path.join(context.output_directory, os.path.basename(on_target_output_file)) with open(host_temp_file) as fh: data = json.load(fh) @@ -175,7 +175,7 @@ class Geekbench(ApkUiautoWorkload): as_root=True).split('\n') if f] for i, on_target_output_file in enumerate(on_target_output_files): host_temp_file = tempfile.mktemp() - self.target.pull(on_target_output_file, host_temp_file) + self.target.pull(on_target_output_file, host_temp_file, as_root=True) host_output_file = os.path.join(context.output_directory, os.path.basename(on_target_output_file)) with open(host_temp_file) as fh: data = json.load(fh) From 74bf1a82e0c1f2e8d71305f366c6c0b73208c294 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Wed, 25 Oct 2017 19:16:39 +0100 Subject: [PATCH 2/2] geekbench: Allow on unrooted when disable_update_result --- wa/workloads/geekbench/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wa/workloads/geekbench/__init__.py b/wa/workloads/geekbench/__init__.py index 5c3840a5..d97bd8b2 100644 --- a/wa/workloads/geekbench/__init__.py +++ b/wa/workloads/geekbench/__init__.py @@ -122,9 +122,11 @@ class Geekbench(ApkUiautoWorkload): def initialize(self, context): super(Geekbench, self).initialize(context) - if not self.target.is_rooted: + if not self.disable_update_result and not self.target.is_rooted: raise WorkloadError( - 'Geekbench workload requires root to collect results') + 'Geekbench workload requires root to collect results. ' + 'You can set disable_update_result=True in the workload params ' + 'to run without collecting results.') def setup(self, context): super(Geekbench, self).setup(context)