blob: 10c3d9e6067742523e5829c191c2b0240626eeef [file] [log] [blame]
mblighb71116b2006-05-17 21:32:55 +00001import test
2from autotest_utils import *
3
4class unixbench(test.test):
5 version = 1
6
7 # http://www.tux.org/pub/tux/niemi/unixbench/unixbench-4.1.0.tgz
8 def setup(self, tarball = 'unixbench-4.1.0.tar.bz2'):
9 tarball = unmap_url(self.bindir, tarball, self.tmpdir)
10 extract_tarball_to_dir(tarball, self.srcdir)
11 os.chdir(self.srcdir)
12
13 system('make')
14
15 def execute(self, iterations = 1, args = ''):
16 for i in range(1, iterations+1):
17 os.chdir(self.srcdir)
18 vars = 'TMPDIR=\"%s\" RESULTDIR=\"%s\"' % (self.tmpdir, self.resultsdir)
19 system(vars + ' ./Run ' + args)
mbligha9991982006-05-25 18:32:43 +000020
21 # Do a profiling run if necessary
22 profilers = self.job.profilers
23 if profilers.present():
24 profilers.start(self)
25 system(vars + ' ./Run ' + args)
26 profilers.stop(self)
27 profilers.report(self)