OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium 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 """Runs all types of tests from one unified interface.""" | 7 """Runs all types of tests from one unified interface.""" |
8 | 8 |
9 import argparse | 9 import argparse |
10 import collections | 10 import collections |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 'path') | 415 'path') |
416 group.add_argument('--delete-stale-data', dest='delete_stale_data', | 416 group.add_argument('--delete-stale-data', dest='delete_stale_data', |
417 action='store_true', | 417 action='store_true', |
418 help='Delete stale test data on the device.') | 418 help='Delete stale test data on the device.') |
419 group.add_argument('--timeout-scale', type=float, | 419 group.add_argument('--timeout-scale', type=float, |
420 help='Factor by which timeouts should be scaled.') | 420 help='Factor by which timeouts should be scaled.') |
421 group.add_argument('--strict-mode', dest='strict_mode', default='testing', | 421 group.add_argument('--strict-mode', dest='strict_mode', default='testing', |
422 help='StrictMode command-line flag set on the device, ' | 422 help='StrictMode command-line flag set on the device, ' |
423 'death/testing to kill the process, off to stop ' | 423 'death/testing to kill the process, off to stop ' |
424 'checking, flash to flash only. Default testing.') | 424 'checking, flash to flash only. Default testing.') |
| 425 group.add_argument('--regenerate-goldens', dest='regenerate_goldens', |
| 426 action='store_true', |
| 427 help='Causes the render tests to not fail when a check' |
| 428 'fails or the golden image is missing but to render' |
| 429 'the view and carry on.') |
425 | 430 |
426 AddCommonOptions(parser) | 431 AddCommonOptions(parser) |
427 AddDeviceOptions(parser) | 432 AddDeviceOptions(parser) |
428 AddRemoteDeviceOptions(parser) | 433 AddRemoteDeviceOptions(parser) |
429 | 434 |
430 | 435 |
431 def AddJUnitTestOptions(parser): | 436 def AddJUnitTestOptions(parser): |
432 """Adds junit test options to |parser|.""" | 437 """Adds junit test options to |parser|.""" |
433 | 438 |
434 group = parser.add_argument_group('JUnit Test Options') | 439 group = parser.add_argument_group('JUnit Test Options') |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 if e.is_infra_error: | 1007 if e.is_infra_error: |
1003 return constants.INFRA_EXIT_CODE | 1008 return constants.INFRA_EXIT_CODE |
1004 return constants.ERROR_EXIT_CODE | 1009 return constants.ERROR_EXIT_CODE |
1005 except: # pylint: disable=W0702 | 1010 except: # pylint: disable=W0702 |
1006 logging.exception('Unrecognized error occurred.') | 1011 logging.exception('Unrecognized error occurred.') |
1007 return constants.ERROR_EXIT_CODE | 1012 return constants.ERROR_EXIT_CODE |
1008 | 1013 |
1009 | 1014 |
1010 if __name__ == '__main__': | 1015 if __name__ == '__main__': |
1011 sys.exit(main()) | 1016 sys.exit(main()) |
OLD | NEW |