blob: 1f5f8bc13c03ca83c65d77a0318b3f8b74e01970 [file] [log] [blame]
mbligh548ace82006-10-19 14:36:45 +00001#!/usr/bin/python
2
3import test
4from autotest_utils import *
5
6class iozone(test.test):
7 version = 1
8
9 #http://www.iozone.org/src/current/iozone3_263.tar
10 def setup(self, tarball = 'iozone3_263.tar'):
11 tarball = unmap_url(self.bindir, tarball, self.tmpdir)
12 extract_tarball_to_dir(tarball, self.srcdir)
13 os.chdir(os.path.join(self.srcdir, 'src/current'))
14
15 arch = get_current_kernel_arch()
16 if (arch == 'ppc'):
17 system('make linux-powerpc')
18 elif (arch == 'ppc64'):
19 system('make linux-powerpc64')
20 elif (arch == 'x86_64'):
21 system('make linux-AMD64')
22 else:
23 system('make linux')
24
25 def execute(self, dir, args = None):
26 os.chdir(dir)
27 if not args:
28 args = '-a'
29 system('%s/src/current/iozone %s' % (self.srcdir, args))
30
31 # Do a profiling run if necessary
32 profilers = self.job.profilers
33 if profilers.present():
34 profilers.start(self)
35 system('%s/src/current/iozone %s' % (self.srcdir, args))
36 profilers.stop(self)
37 profilers.report(self)