OLD | NEW |
1 import os | 1 import os, logging |
2 from autotest_lib.client.bin import test, utils | 2 from autotest_lib.client.bin import test, utils |
3 | 3 |
4 | 4 |
5 class tiobench(test.test): | 5 class tiobench(test.test): |
6 version = 1 | 6 version = 1 |
7 | 7 |
8 # http://prdownloads.sourceforge.net/tiobench/tiobench-0.3.3.tar.gz | 8 # http://prdownloads.sourceforge.net/tiobench/tiobench-0.3.3.tar.gz |
9 def setup(self, tarball = 'tiobench-0.3.3.tar.bz2'): | 9 def setup(self, tarball = 'tiobench-0.3.3.tar.bz2'): |
10 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) | 10 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) |
11 utils.extract_tarball_to_dir(tarball, self.srcdir) | 11 utils.extract_tarball_to_dir(tarball, self.srcdir) |
(...skipping 10 matching lines...) Loading... |
22 if not dir: | 22 if not dir: |
23 self.dir = self.tmpdir | 23 self.dir = self.tmpdir |
24 else: | 24 else: |
25 self.dir = dir | 25 self.dir = dir |
26 if not args: | 26 if not args: |
27 self.args = '--block=4096 --block=8192 --threads=10 --size=1024 --nu
mruns=2' | 27 self.args = '--block=4096 --block=8192 --threads=10 --size=1024 --nu
mruns=2' |
28 else: | 28 else: |
29 self.args = args | 29 self.args = args |
30 | 30 |
31 os.chdir(self.srcdir) | 31 os.chdir(self.srcdir) |
32 utils.system('./tiobench.pl --dir %s %s' %(self.dir, self.args)) | 32 results = utils.system_output('./tiobench.pl --dir %s %s' % |
| 33 (self.dir, self.args)) |
| 34 |
| 35 logging.info(results) |
| 36 results_path = os.path.join(self.resultsdir, |
| 37 'raw_output_%s' % self.iteration) |
| 38 |
| 39 utils.open_write_close(results_path, results) |
OLD | NEW |