mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
workloads/hwuitest: Do not try to process output if none present.
If the workload is abnormally terminated and no output is collected do not attempt to process the output.
This commit is contained in:
parent
4260139a7c
commit
8fa32cfd9d
@ -34,7 +34,7 @@ class HWUITest(Workload):
|
|||||||
description = """
|
description = """
|
||||||
Tests UI rendering latency on Android devices.
|
Tests UI rendering latency on Android devices.
|
||||||
|
|
||||||
The binary for this workload is built as part of AOSP's
|
The binary for this workload is built as part of AOSP's
|
||||||
frameworks/base/libs/hwui component.
|
frameworks/base/libs/hwui component.
|
||||||
"""
|
"""
|
||||||
supported_platforms = ['android']
|
supported_platforms = ['android']
|
||||||
@ -59,7 +59,7 @@ class HWUITest(Workload):
|
|||||||
def __init__(self, target, *args, **kwargs):
|
def __init__(self, target, *args, **kwargs):
|
||||||
super(HWUITest, self).__init__(target, *args, **kwargs)
|
super(HWUITest, self).__init__(target, *args, **kwargs)
|
||||||
HWUITest.target_exe = None
|
HWUITest.target_exe = None
|
||||||
|
|
||||||
|
|
||||||
@once
|
@once
|
||||||
def initialize(self, context):
|
def initialize(self, context):
|
||||||
@ -69,12 +69,15 @@ class HWUITest(Workload):
|
|||||||
HWUITest.target_exe = self.target.install(host_exe)
|
HWUITest.target_exe = self.target.install(host_exe)
|
||||||
|
|
||||||
def run(self, context):
|
def run(self, context):
|
||||||
|
self.output = None
|
||||||
self.output = self.target.execute("{} {} {} {}".format(self.target_exe,
|
self.output = self.target.execute("{} {} {} {}".format(self.target_exe,
|
||||||
self.test.lower(),
|
self.test.lower(),
|
||||||
self.loops,
|
self.loops,
|
||||||
self.frames))
|
self.frames))
|
||||||
|
|
||||||
def extract_results(self, context):
|
def extract_results(self, context):
|
||||||
|
if not self.output:
|
||||||
|
return
|
||||||
outfile = os.path.join(context.output_directory, 'hwuitest.output')
|
outfile = os.path.join(context.output_directory, 'hwuitest.output')
|
||||||
with open(outfile, 'w') as wfh:
|
with open(outfile, 'w') as wfh:
|
||||||
wfh.write(self.output)
|
wfh.write(self.output)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user