Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: client/tests/ltp/ltp.py

Issue 3554003: Merge remote branch 'cros/upstream' into tempbranch3 (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/tests/lmbench/lmbench.py ('k') | client/tests/monotonic_time/monotonic_time.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import os 1 import os
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 class ltp(test.test): 5 class ltp(test.test):
6 version = 6 6 version = 6
7 7
8 def _import_site_config(self): 8 def _import_site_config(self):
9 site_config_path = os.path.join(os.path.dirname(__file__), 9 site_config_path = os.path.join(os.path.dirname(__file__),
10 'site_config.py') 10 'site_config.py')
(...skipping 22 matching lines...) Expand all
33 33
34 utils.system('patch -p1 < ../ltp.patch') 34 utils.system('patch -p1 < ../ltp.patch')
35 35
36 # comment the capability tests if we fail to load the capability module 36 # comment the capability tests if we fail to load the capability module
37 try: 37 try:
38 utils.system('modprobe capability') 38 utils.system('modprobe capability')
39 except error.CmdError, detail: 39 except error.CmdError, detail:
40 utils.system('patch -p1 < ../ltp_capability.patch') 40 utils.system('patch -p1 < ../ltp_capability.patch')
41 41
42 utils.system('cp ../scan.c pan/') # saves having lex installed 42 utils.system('cp ../scan.c pan/') # saves having lex installed
43 utils.system('make autotools') 43 utils.make('autotools')
44 utils.configure('--prefix=%s' % ltpbin_dir) 44 utils.configure('--prefix=%s' % ltpbin_dir)
45 utils.system('make -j %d all' % utils.count_cpus()) 45 utils.make('-j %d all' % utils.count_cpus())
46 utils.system('yes n | make SKIP_IDCHECK=1 install') 46 utils.system('yes n | make SKIP_IDCHECK=1 install')
47 47
48 48
49 # Note: to run a specific test, try '-f cmdfile -s test' in the 49 # Note: to run a specific test, try '-f cmdfile -s test' in the
50 # in the args (-f for test file and -s for the test case) 50 # in the args (-f for test file and -s for the test case)
51 # eg, job.run_test('ltp', '-f math -s float_bessel') 51 # eg, job.run_test('ltp', '-f math -s float_bessel')
52 def run_once(self, args = '', script = 'runltp', ignore_tests=[]): 52 def run_once(self, args = '', script = 'runltp', ignore_tests=[]):
53 53
54 ignore_tests = ignore_tests + self.site_ignore_tests 54 ignore_tests = ignore_tests + self.site_ignore_tests
55 55
56 # In case the user wants to run another test script 56 # In case the user wants to run another test script
57 if script == 'runltp': 57 if script == 'runltp':
58 logfile = os.path.join(self.resultsdir, 'ltp.log') 58 logfile = os.path.join(self.resultsdir, 'ltp.log')
59 outfile = os.path.join(self.resultsdir, 'ltp.out') 59 outfile = os.path.join(self.resultsdir, 'ltp.out')
60 failcmdfile = os.path.join(self.debugdir, 'failcmdfile') 60 failcmdfile = os.path.join(self.debugdir, 'failcmdfile')
61 excludecmdfile = os.path.join(self.bindir, 'site_excluded') 61 excludecmdfile = os.path.join(self.bindir, 'site_excluded')
62 args2 = '-q -l %s -C %s -d %s -o %s -S %s' % (logfile, failcmdfile, 62 args2 = '-q -l %s -C %s -d %s -o %s -S %s' % (logfile, failcmdfile,
63 self.tmpdir, outfile, 63 self.tmpdir, outfile,
64 excludecmdfile) 64 excludecmdfile)
65 args = args + ' ' + args2 65 args = args + ' ' + args2
66 66
67 ltpbin_dir = os.path.join(self.srcdir, 'bin') 67 ltpbin_dir = os.path.join(self.srcdir, 'bin')
68 cmd = os.path.join(ltpbin_dir, script) + ' ' + args 68 cmd = os.path.join(ltpbin_dir, script) + ' ' + args
69 result = utils.run(cmd, ignore_status=True) 69 result = utils.run(cmd, ignore_status=True)
70 70
71 # look for if there is any failed test command. 71 # look for if there is any failed test command.
72 failed_cmd = open(failcmdfile).read() 72 failed_cmd = open(failcmdfile).read()
73 if failed_cmd: 73 if failed_cmd:
74 raise error.TestFail(failed_cmd) 74 raise error.TestFail(failed_cmd)
OLDNEW
« no previous file with comments | « client/tests/lmbench/lmbench.py ('k') | client/tests/monotonic_time/monotonic_time.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698