mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 18:21:14 +00:00
nenamark: made duration configurable.
This commit is contained in:
parent
0d076fe8ba
commit
2e35d4003f
@ -18,7 +18,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from wlauto import AndroidBenchmark
|
from wlauto import AndroidBenchmark, Parameter
|
||||||
|
|
||||||
|
|
||||||
class Nenamark(AndroidBenchmark):
|
class Nenamark(AndroidBenchmark):
|
||||||
@ -39,12 +39,20 @@ class Nenamark(AndroidBenchmark):
|
|||||||
package = 'se.nena.nenamark2'
|
package = 'se.nena.nenamark2'
|
||||||
activity = 'se.nena.nenamark2.NenaMark2'
|
activity = 'se.nena.nenamark2.NenaMark2'
|
||||||
|
|
||||||
|
parameters = [
|
||||||
|
Parameter('duration', kind=int, default=120,
|
||||||
|
description="""
|
||||||
|
Number of seconds to wait before considering the benchmark
|
||||||
|
finished
|
||||||
|
"""),
|
||||||
|
]
|
||||||
|
|
||||||
regex = re.compile('.*NenaMark2.*Score.*?([0-9\.]*)fps')
|
regex = re.compile('.*NenaMark2.*Score.*?([0-9\.]*)fps')
|
||||||
|
|
||||||
def run(self, context):
|
def run(self, context):
|
||||||
time.sleep(5) # wait for nenamark menu to show up
|
time.sleep(5) # wait for nenamark menu to show up
|
||||||
self.device.execute('input keyevent 23')
|
self.device.execute('input keyevent 23')
|
||||||
time.sleep(120) # wait two minutes for nenamark to complete
|
time.sleep(self.duration)
|
||||||
|
|
||||||
def update_result(self, context):
|
def update_result(self, context):
|
||||||
super(Nenamark, self).update_result(context)
|
super(Nenamark, self).update_result(context)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user