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

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

Issue 1161005: autotest: Make the "ltp" test comile on ARM. (Closed)
Patch Set: Move configure() back to utils Created 10 years, 9 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
« no previous file with comments | « client/tests/ltp/ltp.patch ('k') | no next file » | 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 23 matching lines...) Expand all
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.system('make autotools')
44 utils.system('./configure --prefix=%s' % ltpbin_dir) 44 utils.configure('--prefix=%s' % ltpbin_dir)
45 utils.system('make -j %d all' % utils.count_cpus()) 45 utils.system('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
(...skipping 10 matching lines...) Expand all
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/ltp/ltp.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698