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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 sys.exit(0) | 178 sys.exit(0) |
179 test_list = all_tests | 179 test_list = all_tests |
180 else: | 180 else: |
181 test_list = options.build | 181 test_list = options.build |
182 | 182 |
183 environ['FEATURES'] = ('%s -buildpkg -collision-protect' % | 183 environ['FEATURES'] = ('%s -buildpkg -collision-protect' % |
184 environ.get('FEATURES', '')) | 184 environ.get('FEATURES', '')) |
185 environ['TEST_LIST'] = test_list | 185 environ['TEST_LIST'] = test_list |
186 environ['USE'] = use_flag | 186 environ['USE'] = use_flag |
187 emerge_cmd = ['emerge-%s' % options.board, | 187 emerge_cmd = ['emerge-%s' % options.board, |
188 '-uDn', | |
189 'chromeos-base/autotest'] | 188 'chromeos-base/autotest'] |
190 if emerge_jobs: | 189 if emerge_jobs: |
191 emerge_cmd.append(emerge_jobs) | 190 emerge_cmd.append(emerge_jobs) |
192 return run(emerge_cmd) | 191 return run(emerge_cmd) |
193 | 192 |
194 | 193 |
195 def run_autoserv(options, args): | 194 def run_autoserv(options, args): |
196 environ = os.environ | 195 environ = os.environ |
197 | 196 |
198 environ['AUTOSERV_TEST_ARGS'] = options.args | 197 environ['AUTOSERV_TEST_ARGS'] = options.args |
(...skipping 25 matching lines...) Expand all Loading... |
224 die(common_sh, 'build_autotest failed.') | 223 die(common_sh, 'build_autotest failed.') |
225 else: | 224 else: |
226 ssh_key_file = os.path.join(os.path.dirname(me), | 225 ssh_key_file = os.path.join(os.path.dirname(me), |
227 'mod_for_test_scripts/ssh_keys/testing_rsa') | 226 'mod_for_test_scripts/ssh_keys/testing_rsa') |
228 os.chmod(ssh_key_file, 0400) | 227 os.chmod(ssh_key_file, 0400) |
229 run_autoserv(options, args) | 228 run_autoserv(options, args) |
230 | 229 |
231 | 230 |
232 if __name__ == '__main__': | 231 if __name__ == '__main__': |
233 main() | 232 main() |
OLD | NEW |