mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +00:00
Revert "Updated workload versions to match APK files"
This reverts commit b426e00f2fd98bc602b40bec815847c6287b610a.
This commit is contained in:
parent
1bbd3ef87a
commit
f9ec869c7b
@ -48,7 +48,7 @@ class Antutu(AndroidUiAutoBenchmark):
|
|||||||
activity = ".ABenchMarkStart"
|
activity = ".ABenchMarkStart"
|
||||||
summary_metrics = ['score', 'Overall_Score']
|
summary_metrics = ['score', 'Overall_Score']
|
||||||
|
|
||||||
valid_versions = ['3.3.2', '4.0.3', '5.3', '6.0.1']
|
valid_versions = ['3.3.2', '4.0.3', '5.3.0', '6.0.1']
|
||||||
|
|
||||||
device_prefs_directory = '/data/data/com.antutu.ABenchMark/shared_prefs'
|
device_prefs_directory = '/data/data/com.antutu.ABenchMark/shared_prefs'
|
||||||
device_prefs_file = '/'.join([device_prefs_directory, 'com.antutu.ABenchMark_preferences.xml'])
|
device_prefs_file = '/'.join([device_prefs_directory, 'com.antutu.ABenchMark_preferences.xml'])
|
||||||
|
Binary file not shown.
@ -66,7 +66,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
while (true) {
|
while (true) {
|
||||||
if(version.equals("6.0.1"))
|
if(version.equals("6.0.1"))
|
||||||
hitTestButtonVersion5(TestButton6);
|
hitTestButtonVersion5(TestButton6);
|
||||||
else if (version.equals("5.3")) {
|
else if (version.equals("5.3.0")) {
|
||||||
hitTestButton();
|
hitTestButton();
|
||||||
hitTestButtonVersion5(TestButton5);
|
hitTestButtonVersion5(TestButton5);
|
||||||
}
|
}
|
||||||
@ -308,7 +308,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
|
|
||||||
public void returnToTestScreen(String version) throws Exception {
|
public void returnToTestScreen(String version) throws Exception {
|
||||||
getUiDevice().pressBack();
|
getUiDevice().pressBack();
|
||||||
if (version.equals("5.3"))
|
if (version.equals("5.3.0"))
|
||||||
{
|
{
|
||||||
UiSelector selector = new UiSelector();
|
UiSelector selector = new UiSelector();
|
||||||
UiObject detailsButton = new UiObject(new UiSelector().className("android.widget.Button")
|
UiObject detailsButton = new UiObject(new UiSelector().className("android.widget.Button")
|
||||||
|
@ -59,11 +59,11 @@ class Geekbench(AndroidUiAutoBenchmark):
|
|||||||
"""
|
"""
|
||||||
summary_metrics = ['score', 'multicore_score']
|
summary_metrics = ['score', 'multicore_score']
|
||||||
versions = {
|
versions = {
|
||||||
'3.0.0': {
|
'3': {
|
||||||
'package': 'com.primatelabs.geekbench3',
|
'package': 'com.primatelabs.geekbench3',
|
||||||
'activity': '.HomeActivity',
|
'activity': '.HomeActivity',
|
||||||
},
|
},
|
||||||
'2.2.7': {
|
'2': {
|
||||||
'package': 'ca.primatelabs.geekbench2',
|
'package': 'ca.primatelabs.geekbench2',
|
||||||
'activity': '.HomeActivity',
|
'activity': '.HomeActivity',
|
||||||
},
|
},
|
||||||
@ -95,7 +95,7 @@ class Geekbench(AndroidUiAutoBenchmark):
|
|||||||
self.run_timeout = 5 * 60 * self.times
|
self.run_timeout = 5 * 60 * self.times
|
||||||
|
|
||||||
def initialize(self, context):
|
def initialize(self, context):
|
||||||
if self.version == '3.0.0' and not self.device.is_rooted:
|
if self.version == '3' and not self.device.is_rooted:
|
||||||
raise WorkloadError('Geekbench workload only works on rooted devices.')
|
raise WorkloadError('Geekbench workload only works on rooted devices.')
|
||||||
|
|
||||||
def init_resources(self, context):
|
def init_resources(self, context):
|
||||||
@ -108,14 +108,12 @@ class Geekbench(AndroidUiAutoBenchmark):
|
|||||||
|
|
||||||
def update_result(self, context):
|
def update_result(self, context):
|
||||||
super(Geekbench, self).update_result(context)
|
super(Geekbench, self).update_result(context)
|
||||||
if self.version == "2.2.7":
|
update_method = getattr(self, 'update_result_{}'.format(self.version))
|
||||||
self.update_result_2(context)
|
update_method(context)
|
||||||
else:
|
|
||||||
self.update_result_3(context)
|
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if (self.times > 1) and (self.version == '2.2.7'):
|
if (self.times > 1) and (self.version == '2'):
|
||||||
raise ConfigError('times parameter is not supported for version 2.2.7 of Geekbench.')
|
raise ConfigError('times parameter is not supported for version 2 of Geekbench.')
|
||||||
|
|
||||||
def update_result_2(self, context):
|
def update_result_2(self, context):
|
||||||
score_calculator = GBScoreCalculator()
|
score_calculator = GBScoreCalculator()
|
||||||
|
Binary file not shown.
@ -38,20 +38,20 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
|
|
||||||
public void runUiAutomation() throws Exception {
|
public void runUiAutomation() throws Exception {
|
||||||
Bundle params = getParams();
|
Bundle params = getParams();
|
||||||
String version = params.getString("version");
|
int version = Integer.parseInt(params.getString("version"));
|
||||||
int times = Integer.parseInt(params.getString("times"));
|
int times = Integer.parseInt(params.getString("times"));
|
||||||
|
|
||||||
for (int i = 0; i < times; i++) {
|
for (int i = 0; i < times; i++) {
|
||||||
runBenchmarks();
|
runBenchmarks();
|
||||||
if(version.equals("2.2.7")) {
|
switch(version) {
|
||||||
|
case 2:
|
||||||
// In version 2, we scroll through the results WebView to make sure
|
// 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
|
// all results appear on the screen, which causes them to be dumped into
|
||||||
// logcat by the Linaro hacks.
|
// logcat by the Linaro hacks.
|
||||||
waitForResultsv2();
|
waitForResultsv2();
|
||||||
scrollThroughResults();
|
scrollThroughResults();
|
||||||
break;
|
break;
|
||||||
}
|
case 3:
|
||||||
else if(version.equals("3.0.0")) {
|
|
||||||
// Attempting to share the results will generate the .gb3 file with
|
// Attempting to share the results will generate the .gb3 file with
|
||||||
// results that can then be pulled from the device. This is not possible
|
// results that can then be pulled from the device. This is not possible
|
||||||
// in verison 2 of Geekbench (Share option was added later).
|
// in verison 2 of Geekbench (Share option was added later).
|
||||||
|
@ -57,14 +57,14 @@ class Glb(AndroidUiAutoBenchmark):
|
|||||||
view = 'com.glbenchmark.glbenchmark27/com.glbenchmark.activities.GLBRender'
|
view = 'com.glbenchmark.glbenchmark27/com.glbenchmark.activities.GLBRender'
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
'2.7': 'com.glbenchmark.glbenchmark27',
|
'2.7.0': 'com.glbenchmark.glbenchmark27',
|
||||||
'2.5': 'com.glbenchmark.glbenchmark25',
|
'2.5.1': 'com.glbenchmark.glbenchmark25',
|
||||||
}
|
}
|
||||||
# If usecase is not specified the default usecase is the first supported usecase alias
|
# If usecase is not specified the default usecase is the first supported usecase alias
|
||||||
# for the specified version.
|
# for the specified version.
|
||||||
supported_usecase_aliases = {
|
supported_usecase_aliases = {
|
||||||
'2.7': ['t-rex', 'egypt'],
|
'2.7.0': ['t-rex', 'egypt'],
|
||||||
'2.5': ['egypt-classic', 'egypt'],
|
'2.5.1': ['egypt-classic', 'egypt'],
|
||||||
}
|
}
|
||||||
|
|
||||||
default_iterations = 1
|
default_iterations = 1
|
||||||
@ -73,15 +73,15 @@ class Glb(AndroidUiAutoBenchmark):
|
|||||||
regex = re.compile(r'GLBenchmark (metric|FPS): (.*)')
|
regex = re.compile(r'GLBenchmark (metric|FPS): (.*)')
|
||||||
|
|
||||||
parameters = [
|
parameters = [
|
||||||
Parameter('version', default='2.7', allowed_values=['2.7', '2.5'],
|
Parameter('version', default='2.7.0', allowed_values=['2.7.0', '2.5.1'],
|
||||||
description=('Specifies which version of the benchmark to run (different versions '
|
description=('Specifies which version of the benchmark to run (different versions '
|
||||||
'support different use cases).')),
|
'support different use cases).')),
|
||||||
Parameter('use_case', default=None,
|
Parameter('use_case', default=None,
|
||||||
description="""Specifies which usecase to run, as listed in the benchmark menu; e.g.
|
description="""Specifies which usecase to run, as listed in the benchmark menu; e.g.
|
||||||
``'GLBenchmark 2.5 Egypt HD'``. For convenience, two aliases are provided
|
``'GLBenchmark 2.5 Egypt HD'``. For convenience, two aliases are provided
|
||||||
for the most common use cases: ``'egypt'`` and ``'t-rex'``. These could
|
for the most common use cases: ``'egypt'`` and ``'t-rex'``. These could
|
||||||
be use instead of the full use case title. For version ``'2.7'`` it defaults
|
be use instead of the full use case title. For version ``'2.7.0'`` it defaults
|
||||||
to ``'t-rex'``, for version ``'2.5'`` it defaults to ``'egypt-classic'``.
|
to ``'t-rex'``, for version ``'2.5.1'`` it defaults to ``'egypt-classic'``.
|
||||||
"""),
|
"""),
|
||||||
Parameter('variant', default='onscreen',
|
Parameter('variant', default='onscreen',
|
||||||
description="""Specifies which variant of the use case to run, as listed in the benchmarks
|
description="""Specifies which variant of the use case to run, as listed in the benchmarks
|
||||||
|
Binary file not shown.
@ -81,7 +81,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
UiObject useCaseText = new UiObject(selector.className("android.widget.TextView")
|
UiObject useCaseText = new UiObject(selector.className("android.widget.TextView")
|
||||||
.text(useCase)
|
.text(useCase)
|
||||||
);
|
);
|
||||||
if (version.equals("2.7")){
|
if (version.equals("2.7.0")){
|
||||||
UiObject variantText = useCaseText.getFromParent(selector.className("android.widget.TextView")
|
UiObject variantText = useCaseText.getFromParent(selector.className("android.widget.TextView")
|
||||||
.text(variant));
|
.text(variant));
|
||||||
int scrolls = 0;
|
int scrolls = 0;
|
||||||
@ -94,7 +94,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
}
|
}
|
||||||
variantText.click();
|
variantText.click();
|
||||||
}
|
}
|
||||||
else if (version.equals("2.5")){
|
else if (version.equals("2.5.1")){
|
||||||
int scrolls = 0;
|
int scrolls = 0;
|
||||||
while(!useCaseText.exists()) {
|
while(!useCaseText.exists()) {
|
||||||
testList.scrollForward();
|
testList.scrollForward();
|
||||||
@ -123,7 +123,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
public void waitForResults(String version, String useCase, int timeout) throws Exception {
|
public void waitForResults(String version, String useCase, int timeout) throws Exception {
|
||||||
UiSelector selector = new UiSelector();
|
UiSelector selector = new UiSelector();
|
||||||
UiObject results = null;
|
UiObject results = null;
|
||||||
if (version.equals("2.7"))
|
if (version.equals("2.7.0"))
|
||||||
results = new UiObject(selector.text("Results").className("android.widget.TextView"));
|
results = new UiObject(selector.text("Results").className("android.widget.TextView"));
|
||||||
else
|
else
|
||||||
results = new UiObject(selector.text(useCase).className("android.widget.TextView"));
|
results = new UiObject(selector.text(useCase).className("android.widget.TextView"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user