From 6159711a050a144a10034d58e36e47130e885f01 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Thu, 8 Oct 2015 09:16:32 +0100 Subject: [PATCH] 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. --- wlauto/workloads/iozone/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wlauto/workloads/iozone/__init__.py b/wlauto/workloads/iozone/__init__.py index d1b85e41..57bbfe46 100644 --- a/wlauto/workloads/iozone/__init__.py +++ b/wlauto/workloads/iozone/__init__.py @@ -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: