OLD | NEW |
1 import os, re | 1 import os, re |
2 from autotest_lib.client.bin import utils, test | 2 from autotest_lib.client.bin import utils, test |
3 from autotest_lib.client.common_lib import error | 3 from autotest_lib.client.common_lib import error |
4 | 4 |
5 # test requires at least 2.6.26, will skip otherwise (check is internal) | 5 # test requires at least 2.6.26, will skip otherwise (check is internal) |
6 class perfmon(test.test): | 6 class perfmon(test.test): |
7 version = 16 | 7 version = 16 |
8 | 8 |
9 def setup(self, tarball = 'perfmon-tests-0.3.tar.gz'): | 9 def setup(self, tarball = 'perfmon-tests-0.3.tar.gz'): |
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) |
12 os.chdir(self.srcdir) | 12 os.chdir(self.srcdir) |
13 utils.make() | 13 utils.system('make') |
14 | 14 |
15 | 15 |
16 def initialize(self): | 16 def initialize(self): |
17 self.job.require_gcc() | 17 self.job.require_gcc() |
18 self.results = [] | 18 self.results = [] |
19 | 19 |
20 | 20 |
21 def run_once(self, dir = None, nprocs = None, args = ''): | 21 def run_once(self, dir = None, nprocs = None, args = ''): |
22 cmd = self.srcdir + '/tests/pfm_tests' + args | 22 cmd = self.srcdir + '/tests/pfm_tests' + args |
23 # self.results.append(utils.system_output(cmd, retain_output=True)) | 23 # self.results.append(utils.system_output(cmd, retain_output=True)) |
24 if 'FAIL' in utils.system_output(cmd, retain_output=True): | 24 if 'FAIL' in utils.system_output(cmd, retain_output=True): |
25 raise error.TestError('some perfmon tests failed') | 25 raise error.TestError('some perfmon tests failed') |
OLD | NEW |