OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 # | 6 # |
7 # A python wrapper to call autotest ebuild. | 7 # A python wrapper to call autotest ebuild. |
8 | 8 |
9 import commands, logging, optparse, os, subprocess, sys | 9 import commands, logging, optparse, os, subprocess, sys |
10 | 10 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 if os.path.exists(board_blacklist_file): | 143 if os.path.exists(board_blacklist_file): |
144 blacklist = [line.strip() | 144 blacklist = [line.strip() |
145 for line in open(board_blacklist_file).readlines()] | 145 for line in open(board_blacklist_file).readlines()] |
146 else: | 146 else: |
147 blacklist = [] | 147 blacklist = [] |
148 | 148 |
149 all_tests = 'compilebench,dbench,disktest,netperf2,ltp,unixbench' | 149 all_tests = 'compilebench,dbench,disktest,netperf2,ltp,unixbench' |
150 site_tests = '../third_party/autotest/files/client/site_tests' | 150 site_tests = '../third_party/autotest/files/client/site_tests' |
151 for site_test in os.listdir(site_tests): | 151 for site_test in os.listdir(site_tests): |
152 test_path = os.path.join(site_tests, site_test) | 152 test_path = os.path.join(site_tests, site_test) |
153 if (os.path.exists(test_path) and os.path.isdir(test_path) | 153 test_py = os.path.join(test_path, '%s.py' % site_test) |
154 and site_test not in blacklist): | 154 if (os.path.exists(test_path) and os.path.isdir(test_path) and |
| 155 os.path.exists(test_py) and os.path.isfile(test_py) and |
| 156 site_test not in blacklist): |
155 all_tests += ',' + site_test | 157 all_tests += ',' + site_test |
156 | 158 |
157 if 'all' == options.build.lower(): | 159 if 'all' == options.build.lower(): |
158 if options.noprompt is not True: | 160 if options.noprompt is not True: |
159 print 'You want to pre-build all client tests and it may take a long', | 161 print 'You want to pre-build all client tests and it may take a long', |
160 print 'time to finish.' | 162 print 'time to finish.' |
161 print 'Are you sure you want to continue?(N/y)', | 163 print 'Are you sure you want to continue?(N/y)', |
162 answer = sys.stdin.readline() | 164 answer = sys.stdin.readline() |
163 if 'y' != answer[0].lower(): | 165 if 'y' != answer[0].lower(): |
164 print 'Use --build to specify tests you like to pre-compile. ' | 166 print 'Use --build to specify tests you like to pre-compile. ' |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 else: | 208 else: |
207 ssh_key_file = os.path.join(os.path.dirname(me), | 209 ssh_key_file = os.path.join(os.path.dirname(me), |
208 'mod_for_test_scripts/ssh_keys/testing_rsa') | 210 'mod_for_test_scripts/ssh_keys/testing_rsa') |
209 os.chmod(ssh_key_file, 0400) | 211 os.chmod(ssh_key_file, 0400) |
210 run_autoserv(options.board, args) | 212 run_autoserv(options.board, args) |
211 | 213 |
212 | 214 |
213 if __name__ == '__main__': | 215 if __name__ == '__main__': |
214 main() | 216 main() |
215 | 217 |
OLD | NEW |