mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 11:22:41 +01:00
wa/workloads: Update to consistently use timeout
parameter
This commit is contained in:
@@ -81,7 +81,7 @@ class Jankbench(ApkWorkload):
|
|||||||
|
|
||||||
This defaults to ``True`` for rooted devices and ``False`` otherwise.
|
This defaults to ``True`` for rooted devices and ``False`` otherwise.
|
||||||
'''),
|
'''),
|
||||||
Parameter('run_timeout', kind=int, default=10 * 60,
|
Parameter('timeout', kind=int, default=10 * 60, aliases=['run_timeout'],
|
||||||
description="""
|
description="""
|
||||||
Time out for workload execution. The workload will be killed if it hasn't completed
|
Time out for workload execution. The workload will be killed if it hasn't completed
|
||||||
within this period.
|
within this period.
|
||||||
@@ -102,13 +102,13 @@ class Jankbench(ApkWorkload):
|
|||||||
self.monitor.start()
|
self.monitor.start()
|
||||||
|
|
||||||
def run(self, context):
|
def run(self, context):
|
||||||
result = self.target.execute(self.command, timeout=self.run_timeout)
|
result = self.target.execute(self.command, timeout=self.timeout)
|
||||||
if 'FAILURE' in result:
|
if 'FAILURE' in result:
|
||||||
raise WorkloadError(result)
|
raise WorkloadError(result)
|
||||||
else:
|
else:
|
||||||
self.logger.debug(result)
|
self.logger.debug(result)
|
||||||
self.target.sleep(DELAY)
|
self.target.sleep(DELAY)
|
||||||
self.monitor.wait_for_run_end(self.run_timeout)
|
self.monitor.wait_for_run_end(self.timeout)
|
||||||
|
|
||||||
def extract_results(self, context):
|
def extract_results(self, context):
|
||||||
self.monitor.stop()
|
self.monitor.stop()
|
||||||
|
@@ -205,11 +205,12 @@ class Meabo(Workload):
|
|||||||
default=2097152,
|
default=2097152,
|
||||||
),
|
),
|
||||||
Parameter(
|
Parameter(
|
||||||
'run_timeout',
|
'timeout',
|
||||||
kind=int,
|
kind=int,
|
||||||
description="""
|
description="""
|
||||||
Timeout for execution of the test.
|
Timeout for execution of the test.
|
||||||
""",
|
""",
|
||||||
|
aliases=['run_timeout'],
|
||||||
constraint=lambda x: x > 0,
|
constraint=lambda x: x > 0,
|
||||||
default=60 * 45,
|
default=60 * 45,
|
||||||
),
|
),
|
||||||
@@ -245,7 +246,7 @@ class Meabo(Workload):
|
|||||||
|
|
||||||
def run(self, context):
|
def run(self, context):
|
||||||
self.output = self.target.execute(self.command,
|
self.output = self.target.execute(self.command,
|
||||||
timeout=self.run_timeout)
|
timeout=self.timeout)
|
||||||
|
|
||||||
def update_output(self, context):
|
def update_output(self, context):
|
||||||
if self.output is None:
|
if self.output is None:
|
||||||
|
Reference in New Issue
Block a user