| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 optparse.OptionParser.print_help(self, file) | 51 optparse.OptionParser.print_help(self, file) |
| 52 MyOptionPaser.help = True | 52 MyOptionPaser.help = True |
| 53 | 53 |
| 54 | 54 |
| 55 parser = MyOptionPaser() | 55 parser = MyOptionPaser() |
| 56 parser.allow_interspersed_args = True | 56 parser.allow_interspersed_args = True |
| 57 | 57 |
| 58 DEFAULT_BOARD = os.environ.get('DEFAULT_BOARD', '') | 58 DEFAULT_BOARD = os.environ.get('DEFAULT_BOARD', '') |
| 59 | 59 |
| 60 parser.add_option('--autox', dest='autox', action='store_true', | 60 parser.add_option('--autox', dest='autox', action='store_true', |
| 61 help='Build autox along with autotest.') | 61 default=True, |
| 62 help='Build autox along with autotest [default].') |
| 63 parser.add_option('--noautox', dest='autox', action='store_false', |
| 64 help='Don\'t build autox along with autotest.') |
| 62 parser.add_option('--board', dest='board', action='store', | 65 parser.add_option('--board', dest='board', action='store', |
| 63 default=DEFAULT_BOARD, | 66 default=DEFAULT_BOARD, |
| 64 help='The board for which you are building autotest.') | 67 help='The board for which you are building autotest.') |
| 65 parser.add_option('--build', dest='build', action='store', | 68 parser.add_option('--build', dest='build', action='store', |
| 66 help='Only prebuild client tests, do not run tests.') | 69 help='Only prebuild client tests, do not run tests.') |
| 67 parser.add_option('--buildcheck', dest='buildcheck', action='store_true', | 70 parser.add_option('--buildcheck', dest='buildcheck', action='store_true', |
| 68 help='Fail if tests fail to build.') | 71 default=True, |
| 72 help='Fail if tests fail to build [default].') |
| 73 parser.add_option('--nobuildcheck', dest='buildcheck', action='store_false', |
| 74 help='Ignore test build failures.') |
| 69 parser.add_option('--jobs', dest='jobs', action='store', type=int, | 75 parser.add_option('--jobs', dest='jobs', action='store', type=int, |
| 70 default=-1, | 76 default=-1, |
| 71 help='How many packages to build in parallel at maximum.') | 77 help='How many packages to build in parallel at maximum.') |
| 72 parser.add_option('--noprompt', dest='noprompt', action='store_true', | 78 parser.add_option('--noprompt', dest='noprompt', action='store_true', |
| 73 help='Prompt user when building all tests.') | 79 help='Prompt user when building all tests.') |
| 74 | 80 |
| 75 | 81 |
| 76 AUTOSERV='../third_party/autotest/files/server/autoserv' | 82 AUTOSERV='../third_party/autotest/files/server/autoserv' |
| 77 AUTOTEST_CLIENT='../third_party/autotest/files/client/bin/autotest_client' | 83 AUTOTEST_CLIENT='../third_party/autotest/files/client/bin/autotest_client' |
| 78 | 84 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 die(common_sh, 'build_autotest failed.') | 211 die(common_sh, 'build_autotest failed.') |
| 206 else: | 212 else: |
| 207 ssh_key_file = os.path.join(os.path.dirname(me), | 213 ssh_key_file = os.path.join(os.path.dirname(me), |
| 208 'mod_for_test_scripts/ssh_keys/testing_rsa') | 214 'mod_for_test_scripts/ssh_keys/testing_rsa') |
| 209 os.chmod(ssh_key_file, 0400) | 215 os.chmod(ssh_key_file, 0400) |
| 210 run_autoserv(options.board, args) | 216 run_autoserv(options.board, args) |
| 211 | 217 |
| 212 | 218 |
| 213 if __name__ == '__main__': | 219 if __name__ == '__main__': |
| 214 main() | 220 main() |
| 215 | |
| OLD | NEW |