mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-30 14:44:09 +00:00
Updated workload versions to match APK files
Some workloads presented a different version than what was in the APK file.
With the changes introduced in bb33123 several workloads broke.
This commit is contained in:
@@ -59,11 +59,11 @@ class Geekbench(AndroidUiAutoBenchmark):
|
||||
"""
|
||||
summary_metrics = ['score', 'multicore_score']
|
||||
versions = {
|
||||
'3': {
|
||||
'3.0.0': {
|
||||
'package': 'com.primatelabs.geekbench3',
|
||||
'activity': '.HomeActivity',
|
||||
},
|
||||
'2': {
|
||||
'2.2.7': {
|
||||
'package': 'ca.primatelabs.geekbench2',
|
||||
'activity': '.HomeActivity',
|
||||
},
|
||||
@@ -95,7 +95,7 @@ class Geekbench(AndroidUiAutoBenchmark):
|
||||
self.run_timeout = 5 * 60 * self.times
|
||||
|
||||
def initialize(self, context):
|
||||
if self.version == '3' and not self.device.is_rooted:
|
||||
if self.version == '3.0.0' and not self.device.is_rooted:
|
||||
raise WorkloadError('Geekbench workload only works on rooted devices.')
|
||||
|
||||
def init_resources(self, context):
|
||||
@@ -108,12 +108,14 @@ class Geekbench(AndroidUiAutoBenchmark):
|
||||
|
||||
def update_result(self, context):
|
||||
super(Geekbench, self).update_result(context)
|
||||
update_method = getattr(self, 'update_result_{}'.format(self.version))
|
||||
update_method(context)
|
||||
if self.version == "2.2.7":
|
||||
self.update_result_2(context)
|
||||
else:
|
||||
self.update_result_3(context)
|
||||
|
||||
def validate(self):
|
||||
if (self.times > 1) and (self.version == '2'):
|
||||
raise ConfigError('times parameter is not supported for version 2 of Geekbench.')
|
||||
if (self.times > 1) and (self.version == '2.2.7'):
|
||||
raise ConfigError('times parameter is not supported for version 2.2.7 of Geekbench.')
|
||||
|
||||
def update_result_2(self, context):
|
||||
score_calculator = GBScoreCalculator()
|
||||
|
||||
Binary file not shown.
@@ -32,26 +32,26 @@ import com.android.uiautomator.testrunner.UiAutomatorTestCase;
|
||||
|
||||
import com.arm.wlauto.uiauto.BaseUiAutomation;
|
||||
|
||||
public class UiAutomation extends BaseUiAutomation {
|
||||
public class UiAutomation extends BaseUiAutomation {
|
||||
|
||||
public static String TAG = "geekbench";
|
||||
|
||||
public void runUiAutomation() throws Exception {
|
||||
Bundle params = getParams();
|
||||
int version = Integer.parseInt(params.getString("version"));
|
||||
String version = params.getString("version");
|
||||
int times = Integer.parseInt(params.getString("times"));
|
||||
|
||||
for (int i = 0; i < times; i++) {
|
||||
runBenchmarks();
|
||||
switch(version) {
|
||||
case 2:
|
||||
if(version.equals("2.2.7")) {
|
||||
// In version 2, we scroll through the results WebView to make sure
|
||||
// all results appear on the screen, which causes them to be dumped into
|
||||
// logcat by the Linaro hacks.
|
||||
waitForResultsv2();
|
||||
scrollThroughResults();
|
||||
break;
|
||||
case 3:
|
||||
}
|
||||
else if(version.equals("3.0.0")) {
|
||||
// Attempting to share the results will generate the .gb3 file with
|
||||
// results that can then be pulled from the device. This is not possible
|
||||
// in verison 2 of Geekbench (Share option was added later).
|
||||
|
||||
Reference in New Issue
Block a user