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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 | 207 |
208 def main(): | 208 def main(): |
209 me = sys.argv[0] | 209 me = sys.argv[0] |
210 common_sh = os.path.join(os.path.dirname(me), 'common.sh') | 210 common_sh = os.path.join(os.path.dirname(me), 'common.sh') |
211 | 211 |
212 assert_inside_chroot(common_sh) | 212 assert_inside_chroot(common_sh) |
213 set_common_env(common_sh, 'GCLIENT_ROOT') | 213 set_common_env(common_sh, 'GCLIENT_ROOT') |
214 | 214 |
215 options, args = parse_args_and_help() | 215 options, args = parse_args_and_help() |
| 216 |
| 217 if not options.board: |
| 218 die(common_sh, 'Missing --board argument.') |
| 219 |
216 if options.build: | 220 if options.build: |
217 status = build_autotest(options) | 221 status = build_autotest(options) |
218 if status: | 222 if status: |
219 die(common_sh, 'build_autotest failed.') | 223 die(common_sh, 'build_autotest failed.') |
220 else: | 224 else: |
221 ssh_key_file = os.path.join(os.path.dirname(me), | 225 ssh_key_file = os.path.join(os.path.dirname(me), |
222 'mod_for_test_scripts/ssh_keys/testing_rsa') | 226 'mod_for_test_scripts/ssh_keys/testing_rsa') |
223 os.chmod(ssh_key_file, 0400) | 227 os.chmod(ssh_key_file, 0400) |
224 run_autoserv(options, args) | 228 run_autoserv(options, args) |
225 | 229 |
226 | 230 |
227 if __name__ == '__main__': | 231 if __name__ == '__main__': |
228 main() | 232 main() |
OLD | NEW |