Convert all python code to use four-space indents instead of eight-space tabs.
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1658 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/iozone/iozone.py b/client/tests/iozone/iozone.py
index 26c23d6..8347a32 100644
--- a/client/tests/iozone/iozone.py
+++ b/client/tests/iozone/iozone.py
@@ -5,66 +5,66 @@
class iozone(test.test):
- version = 1
+ version = 1
- # http://www.iozone.org/src/current/iozone3_283.tar
- def setup(self, tarball = 'iozone3_283.tar'):
- tarball = utils.unmap_url(self.bindir, tarball,
- self.tmpdir)
- autotest_utils.extract_tarball_to_dir(tarball, self.srcdir)
- os.chdir(os.path.join(self.srcdir, 'src/current'))
+ # http://www.iozone.org/src/current/iozone3_283.tar
+ def setup(self, tarball = 'iozone3_283.tar'):
+ tarball = utils.unmap_url(self.bindir, tarball,
+ self.tmpdir)
+ autotest_utils.extract_tarball_to_dir(tarball, self.srcdir)
+ os.chdir(os.path.join(self.srcdir, 'src/current'))
- arch = autotest_utils.get_current_kernel_arch()
- if (arch == 'ppc'):
- utils.system('make linux-powerpc')
- elif (arch == 'ppc64'):
- utils.system('make linux-powerpc64')
- elif (arch == 'x86_64'):
- utils.system('make linux-AMD64')
- else:
- utils.system('make linux')
+ arch = autotest_utils.get_current_kernel_arch()
+ if (arch == 'ppc'):
+ utils.system('make linux-powerpc')
+ elif (arch == 'ppc64'):
+ utils.system('make linux-powerpc64')
+ elif (arch == 'x86_64'):
+ utils.system('make linux-AMD64')
+ else:
+ utils.system('make linux')
- def execute(self, dir = None, iterations=1, args = None):
- self.keyval = open(os.path.join(self.resultsdir, 'keyval'),
- 'w')
- if not dir:
- dir = self.tmpdir
- os.chdir(dir)
- if not args:
- args = '-a'
- profilers = self.job.profilers
- if not profilers.only():
- for i in range(iterations):
- output = utils.system_output('%s/src/current/iozone %s' %
- (self.srcdir, args))
- self.__format_results(output)
+ def execute(self, dir = None, iterations=1, args = None):
+ self.keyval = open(os.path.join(self.resultsdir, 'keyval'),
+ 'w')
+ if not dir:
+ dir = self.tmpdir
+ os.chdir(dir)
+ if not args:
+ args = '-a'
+ profilers = self.job.profilers
+ if not profilers.only():
+ for i in range(iterations):
+ output = utils.system_output('%s/src/current/iozone %s' %
+ (self.srcdir, args))
+ self.__format_results(output)
- # Do a profiling run if necessary
- if profilers.present():
- profilers.start(self)
- output = utils.system_output('%s/src/current/iozone %s' %
- (self.srcdir, args))
- self.__format_results(output)
- profilers.stop(self)
- profilers.report(self)
+ # Do a profiling run if necessary
+ if profilers.present():
+ profilers.start(self)
+ output = utils.system_output('%s/src/current/iozone %s' %
+ (self.srcdir, args))
+ self.__format_results(output)
+ profilers.stop(self)
+ profilers.report(self)
- self.keyval.close()
+ self.keyval.close()
- def __format_results(self, results):
- labels = ('write', 'rewrite', 'read', 'reread', 'randread',
- 'randwrite', 'bkwdread', 'recordrewrite',
- 'strideread', 'fwrite', 'frewrite',
- 'fread', 'freread')
- for line in results.splitlines():
- fields = line.split()
- if len(fields) != 15:
- continue
- try:
- fields = tuple([int(i) for i in fields])
- except ValueError:
- continue
- for l, v in zip(labels, fields[2:]):
- print >> self.keyval, "%d-%d-%s=%d" % (fields[0], fields[1], l, v)
- print >> self.keyval
+ def __format_results(self, results):
+ labels = ('write', 'rewrite', 'read', 'reread', 'randread',
+ 'randwrite', 'bkwdread', 'recordrewrite',
+ 'strideread', 'fwrite', 'frewrite',
+ 'fread', 'freread')
+ for line in results.splitlines():
+ fields = line.split()
+ if len(fields) != 15:
+ continue
+ try:
+ fields = tuple([int(i) for i in fields])
+ except ValueError:
+ continue
+ for l, v in zip(labels, fields[2:]):
+ print >> self.keyval, "%d-%d-%s=%d" % (fields[0], fields[1], l, v)
+ print >> self.keyval