OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import argparse | 6 import argparse |
7 import os | 7 import os |
8 import subprocess | 8 import subprocess |
9 import sys | 9 import sys |
10 import time | 10 import time |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 help='Run experimental projects', action='store_true') | 329 help='Run experimental projects', action='store_true') |
330 parser.add_argument('-t', '--toolchain', | 330 parser.add_argument('-t', '--toolchain', |
331 help='Run using toolchain. Can be passed more than once.', | 331 help='Run using toolchain. Can be passed more than once.', |
332 action='append', default=[]) | 332 action='append', default=[]) |
333 parser.add_argument('-d', '--dest', | 333 parser.add_argument('-d', '--dest', |
334 help='Select which destinations (project types) are valid.', | 334 help='Select which destinations (project types) are valid.', |
335 action='append') | 335 action='append') |
336 parser.add_argument('-b', '--build', | 336 parser.add_argument('-b', '--build', |
337 help='Build each project before testing.', action='store_true') | 337 help='Build each project before testing.', action='store_true') |
338 parser.add_argument('--retry-times', | 338 parser.add_argument('--retry-times', |
339 help='Number of types to retry on failure (Default: %default)', | 339 help='Number of types to retry on failure', type=int, default=1) |
340 type=int, default=1) | |
341 parser.add_argument('projects', nargs='*') | 340 parser.add_argument('projects', nargs='*') |
342 | 341 |
343 options = parser.parse_args(args) | 342 options = parser.parse_args(args) |
344 | 343 |
345 if not options.toolchain: | 344 if not options.toolchain: |
346 options.toolchain = ['newlib', 'glibc', 'pnacl', 'host'] | 345 options.toolchain = ['newlib', 'glibc', 'pnacl', 'host'] |
347 | 346 |
348 if 'host' in options.toolchain: | 347 if 'host' in options.toolchain: |
349 options.toolchain.remove('host') | 348 options.toolchain.remove('host') |
350 options.toolchain.append(platform) | 349 options.toolchain.append(platform) |
(...skipping 25 matching lines...) Expand all Loading... |
376 | 375 |
377 | 376 |
378 if __name__ == '__main__': | 377 if __name__ == '__main__': |
379 script_name = os.path.basename(sys.argv[0]) | 378 script_name = os.path.basename(sys.argv[0]) |
380 try: | 379 try: |
381 sys.exit(main(sys.argv[1:])) | 380 sys.exit(main(sys.argv[1:])) |
382 except parse_dsc.ValidationError as e: | 381 except parse_dsc.ValidationError as e: |
383 buildbot_common.ErrorExit('%s: %s' % (script_name, e)) | 382 buildbot_common.ErrorExit('%s: %s' % (script_name, e)) |
384 except KeyboardInterrupt: | 383 except KeyboardInterrupt: |
385 buildbot_common.ErrorExit('%s: interrupted' % script_name) | 384 buildbot_common.ErrorExit('%s: interrupted' % script_name) |
OLD | NEW |