Chromium Code Reviews| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 339 # TODO(jbudorick): Remove support for name-style APK specification once | 339 # TODO(jbudorick): Remove support for name-style APK specification once |
| 340 # bots are no longer doing it. | 340 # bots are no longer doing it. |
| 341 group.add_argument('--apk-under-test', | 341 group.add_argument('--apk-under-test', |
| 342 help='Path or name of the apk under test.') | 342 help='Path or name of the apk under test.') |
| 343 group.add_argument('--apk-under-test-incremental-install-script', | 343 group.add_argument('--apk-under-test-incremental-install-script', |
| 344 help='Path to install script for the --apk-under-test.') | 344 help='Path to install script for the --apk-under-test.') |
| 345 group.add_argument('--test-apk', required=True, | 345 group.add_argument('--test-apk', required=True, |
| 346 help='Path or name of the apk containing the tests ' | 346 help='Path or name of the apk containing the tests ' |
| 347 '(name is without the .apk extension; ' | 347 '(name is without the .apk extension; ' |
| 348 'e.g. "ContentShellTest").') | 348 'e.g. "ContentShellTest").') |
| 349 group.add_argument('--test-jar', | |
|
jbudorick
2016/11/30 20:58:53
(if this is going to be required, it should be mar
mikecase (-- gone --)
2016/11/30 21:05:09
It will only be required until CTS CL lands. But,
jbudorick
2016/11/30 21:08:17
ack. With you changing it in the CTS CL, this woul
| |
| 350 help='Path of jar containing test java files.') | |
| 349 group.add_argument('--test-apk-incremental-install-script', | 351 group.add_argument('--test-apk-incremental-install-script', |
| 350 type=os.path.realpath, | 352 type=os.path.realpath, |
| 351 help='Path to install script for the --test-apk.') | 353 help='Path to install script for the --test-apk.') |
| 352 group.add_argument('--additional-apk', action='append', | 354 group.add_argument('--additional-apk', action='append', |
| 353 dest='additional_apks', default=[], | 355 dest='additional_apks', default=[], |
| 354 type=os.path.realpath, | 356 type=os.path.realpath, |
| 355 help='Additional apk that must be installed on ' | 357 help='Additional apk that must be installed on ' |
| 356 'the device when the tests are run') | 358 'the device when the tests are run') |
| 357 group.add_argument('--coverage-dir', type=os.path.realpath, | 359 group.add_argument('--coverage-dir', type=os.path.realpath, |
| 358 help=('Directory in which to place all generated ' | 360 help=('Directory in which to place all generated ' |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 857 if e.is_infra_error: | 859 if e.is_infra_error: |
| 858 return constants.INFRA_EXIT_CODE | 860 return constants.INFRA_EXIT_CODE |
| 859 return constants.ERROR_EXIT_CODE | 861 return constants.ERROR_EXIT_CODE |
| 860 except: # pylint: disable=W0702 | 862 except: # pylint: disable=W0702 |
| 861 logging.exception('Unrecognized error occurred.') | 863 logging.exception('Unrecognized error occurred.') |
| 862 return constants.ERROR_EXIT_CODE | 864 return constants.ERROR_EXIT_CODE |
| 863 | 865 |
| 864 | 866 |
| 865 if __name__ == '__main__': | 867 if __name__ == '__main__': |
| 866 sys.exit(main()) | 868 sys.exit(main()) |
| OLD | NEW |