| 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 collections | 6 import collections |
| 7 import glob | 7 import glob |
| 8 import multiprocessing | 8 import multiprocessing |
| 9 import os | 9 import os |
| 10 import shutil | 10 import shutil |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 CHROME_SRC = constants.DIR_SOURCE_ROOT | 27 CHROME_SRC = constants.DIR_SOURCE_ROOT |
| 28 LOGCAT_DIR = os.path.join(CHROME_SRC, 'out', 'logcat') | 28 LOGCAT_DIR = os.path.join(CHROME_SRC, 'out', 'logcat') |
| 29 | 29 |
| 30 # Describes an instrumation test suite: | 30 # Describes an instrumation test suite: |
| 31 # test: Name of test we're running. | 31 # test: Name of test we're running. |
| 32 # apk: apk to be installed. | 32 # apk: apk to be installed. |
| 33 # apk_package: package for the apk to be installed. | 33 # apk_package: package for the apk to be installed. |
| 34 # test_apk: apk to run tests on. | 34 # test_apk: apk to run tests on. |
| 35 # test_data: data folder in format destination:source. | 35 # test_data: data folder in format destination:source. |
| 36 # host_driven_root: The python test root directory. | 36 # host_driven_root: The host-driven test root directory. |
| 37 # annotation: Annotation of the tests to include. | 37 # annotation: Annotation of the tests to include. |
| 38 # exclude_annotation: The annotation of the tests to exclude. | 38 # exclude_annotation: The annotation of the tests to exclude. |
| 39 I_TEST = collections.namedtuple('InstrumentationTest', [ | 39 I_TEST = collections.namedtuple('InstrumentationTest', [ |
| 40 'name', 'apk', 'apk_package', 'test_apk', 'test_data', 'host_driven_root', | 40 'name', 'apk', 'apk_package', 'test_apk', 'test_data', 'host_driven_root', |
| 41 'annotation', 'exclude_annotation', 'extra_flags']) | 41 'annotation', 'exclude_annotation', 'extra_flags']) |
| 42 | 42 |
| 43 def I(name, apk, apk_package, test_apk, test_data, host_driven_root=None, | 43 def I(name, apk, apk_package, test_apk, test_data, host_driven_root=None, |
| 44 annotation=None, exclude_annotation=None, extra_flags=None): | 44 annotation=None, exclude_annotation=None, extra_flags=None): |
| 45 return I_TEST(name, apk, apk_package, test_apk, test_data, host_driven_root, | 45 return I_TEST(name, apk, apk_package, test_apk, test_data, host_driven_root, |
| 46 annotation, exclude_annotation, extra_flags) | 46 annotation, exclude_annotation, extra_flags) |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 if unknown_tests: | 372 if unknown_tests: |
| 373 return sys.exit('Unknown tests %s' % list(unknown_tests)) | 373 return sys.exit('Unknown tests %s' % list(unknown_tests)) |
| 374 | 374 |
| 375 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 375 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
| 376 | 376 |
| 377 MainTestWrapper(options) | 377 MainTestWrapper(options) |
| 378 | 378 |
| 379 | 379 |
| 380 if __name__ == '__main__': | 380 if __name__ == '__main__': |
| 381 sys.exit(main(sys.argv)) | 381 sys.exit(main(sys.argv)) |
| OLD | NEW |