1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-05 18:31:12 +01: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:
Marc Bonnici 2018-04-05 17:30:36 +01:00 committed by setrofim
parent 4260139a7c
commit 8fa32cfd9d

View File

@ -34,7 +34,7 @@ class HWUITest(Workload):
description = """
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.
"""
supported_platforms = ['android']
@ -59,7 +59,7 @@ class HWUITest(Workload):
def __init__(self, target, *args, **kwargs):
super(HWUITest, self).__init__(target, *args, **kwargs)
HWUITest.target_exe = None
@once
def initialize(self, context):
@ -69,12 +69,15 @@ class HWUITest(Workload):
HWUITest.target_exe = self.target.install(host_exe)
def run(self, context):
self.output = None
self.output = self.target.execute("{} {} {} {}".format(self.target_exe,
self.test.lower(),
self.loops,
self.frames))
def extract_results(self, context):
if not self.output:
return
outfile = os.path.join(context.output_directory, 'hwuitest.output')
with open(outfile, 'w') as wfh:
wfh.write(self.output)