1 import os, re 2 from autotest_lib.client.bin import utils, test 3 from autotest_lib.client.common_lib import error 4 5 # test requires at least 2.6.26, will skip otherwise (check is internal) 6 class perfmon(test.test): 7 version = 16 8 9 def setup(self, tarball = 'perfmon-tests-0.3.tar.gz'): 10 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) 11 utils.extract_tarball_to_dir(tarball, self.srcdir) 12 os.chdir(self.srcdir) 13 utils.make() 14 15 16 def initialize(self): 17 self.job.require_gcc() 18 self.results = [] 19 20 21 def run_once(self, dir = None, nprocs = None, args = ''): 22 cmd = self.srcdir + '/tests/pfm_tests' + args 23 # self.results.append(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') 26