1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21:17 +00:00

iozone: ensure test 0 always runs

Test 0 (write) creates a file that is used by subsequent tests.
Therefore if this test is not specified withen selecting which tests to
run, izone will fail with an error.

To avoid this, check the tests list specified by the user andd add test
0 if necessary.
This commit is contained in:
Sergei Trofimov 2015-10-08 09:16:32 +01:00
parent 208fdf4210
commit 6159711a05

View File

@ -36,7 +36,10 @@ class Iozone(Workload):
document.
0 - Write Test
Measure performance of writing a new file.
Measure performance of writing a new file. Other
tests rely on the file written by this, so it must
always be enabled (WA will automatically neable this
if not specified).
1 - Rewrite Test
Measure performance of writing an existing file.
@ -132,6 +135,7 @@ class Iozone(Workload):
" auto mode at the same time.")
def _build_command(self):
# pylint: disable=access-member-before-definition
iozone_command = 'cd {} && {}'.format(self.device.working_directory,
self.device_binary)
@ -139,6 +143,8 @@ class Iozone(Workload):
iozone_command += ' -a'
if self.tests:
if 0 not in self.tests:
self.tests = [0] + self.tests
iozone_command += ''.join([' -i {}'.format(t) for t in self.tests])
if self.record_length > 0: