1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-22 12:58:36 +00:00

workloads: Fixed versions to be backward compatible

In a recent commit workload versions were changed to match their APK versions.
This commit adds the old versions to the allowed versions and automatically
maps them onto the new values.
This commit is contained in:
Sebastian Goscik 2016-09-13 11:07:18 +01:00
parent 9afe084f2c
commit 8608c3b747
3 changed files with 14 additions and 3 deletions

View File

@ -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', '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'])
@ -70,6 +70,8 @@ class Antutu(AndroidUiAutoBenchmark):
def __init__(self, device, **kwargs): # pylint: disable=W0613 def __init__(self, device, **kwargs): # pylint: disable=W0613
super(Antutu, self).__init__(device, **kwargs) super(Antutu, self).__init__(device, **kwargs)
if self.version == '5.3.0':
self.version = '5.3'
self.run_timeout = 10 * 60 * self.times self.run_timeout = 10 * 60 * self.times
self.uiauto_params['version'] = self.version self.uiauto_params['version'] = self.version
self.uiauto_params['times'] = self.times self.uiauto_params['times'] = self.times

View File

@ -73,7 +73,8 @@ class Geekbench(AndroidUiAutoBenchmark):
replace_regex = re.compile(r'<[^>]*>') replace_regex = re.compile(r'<[^>]*>')
parameters = [ parameters = [
Parameter('version', default=sorted(versions.keys())[-1], allowed_values=sorted(versions.keys()), Parameter('version', default=sorted(versions.keys())[-1], allowed_values=sorted(versions.keys() +
['2', '3']),
description='Specifies which version of the workload should be run.'), description='Specifies which version of the workload should be run.'),
Parameter('times', kind=int, default=1, Parameter('times', kind=int, default=1,
description=('Specfies the number of times the benchmark will be run in a "tight ' description=('Specfies the number of times the benchmark will be run in a "tight '
@ -90,6 +91,10 @@ class Geekbench(AndroidUiAutoBenchmark):
def __init__(self, device, **kwargs): def __init__(self, device, **kwargs):
super(Geekbench, self).__init__(device, **kwargs) super(Geekbench, self).__init__(device, **kwargs)
if self.version == '3':
self.version = '3.0.0'
elif self.version == '2':
self.version = '2.2.7'
self.uiauto_params['version'] = self.version self.uiauto_params['version'] = self.version
self.uiauto_params['times'] = self.times self.uiauto_params['times'] = self.times
self.run_timeout = 5 * 60 * self.times self.run_timeout = 5 * 60 * self.times

View File

@ -73,7 +73,7 @@ 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', allowed_values=['2.7', '2.7.0', '2.5', '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,
@ -111,6 +111,10 @@ class Glb(AndroidUiAutoBenchmark):
def __init__(self, device, **kwargs): def __init__(self, device, **kwargs):
super(Glb, self).__init__(device, **kwargs) super(Glb, self).__init__(device, **kwargs)
if self.version == '2.7.0':
self.version = '2.7'
elif self.version == '2.5.1':
self.version = '2.5'
self.uiauto_params['version'] = self.version self.uiauto_params['version'] = self.version
if self.use_case is None: if self.use_case is None: