blob: 71039fe5d6fd4ae1c1b65454a1505e3f1b6e604b [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'
mbligh9f5113d2007-06-25 23:41:10 +000029 profilers = self.job.profilers
30 if not profilers.only():
31 system('%s/src/current/iozone %s' % (self.srcdir, args))
mbligh548ace82006-10-19 14:36:45 +000032
33 # Do a profiling run if necessary
mbligh548ace82006-10-19 14:36:45 +000034 if profilers.present():
35 profilers.start(self)
36 system('%s/src/current/iozone %s' % (self.srcdir, args))
37 profilers.stop(self)
38 profilers.report(self)