| 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 json | 8 import json |
| 9 import multiprocessing | 9 import multiprocessing |
| 10 import optparse | 10 import optparse |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 Args: | 127 Args: |
| 128 options: options object. | 128 options: options object. |
| 129 suites: List of suites to run. | 129 suites: List of suites to run. |
| 130 """ | 130 """ |
| 131 args = ['--verbose'] | 131 args = ['--verbose'] |
| 132 if options.target == 'Release': | 132 if options.target == 'Release': |
| 133 args.append('--release') | 133 args.append('--release') |
| 134 if options.asan: | 134 if options.asan: |
| 135 args.append('--tool=asan') | 135 args.append('--tool=asan') |
| 136 for suite in suites: | 136 for suite in suites: |
| 137 buildbot_report.PrintNamedStep(suite) | 137 buildbot_report.PrintNamedStep(suite.name) |
| 138 RunCmd(['build/android/run_tests.py', '-s', suite] + args) | 138 cmd = ['build/android/run_tests.py', '-s', suite.name] + args |
| 139 if suite.is_suite_exe: |
| 140 cmd.append('--exe') |
| 141 RunCmd(cmd) |
| 139 | 142 |
| 140 def RunBrowserTestSuite(options): | 143 def RunBrowserTestSuite(options): |
| 141 """Manages an invocation of run_browser_tests.py. | 144 """Manages an invocation of run_browser_tests.py. |
| 142 | 145 |
| 143 Args: | 146 Args: |
| 144 options: options object. | 147 options: options object. |
| 145 """ | 148 """ |
| 146 args = ['--verbose'] | 149 args = ['--verbose'] |
| 147 if options.target == 'Release': | 150 if options.target == 'Release': |
| 148 args.append('--release') | 151 args.append('--release') |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 InstallApk(options, test_obj, print_step=True) | 269 InstallApk(options, test_obj, print_step=True) |
| 267 | 270 |
| 268 if 'chromedriver' in options.test_filter: | 271 if 'chromedriver' in options.test_filter: |
| 269 RunChromeDriverTests() | 272 RunChromeDriverTests() |
| 270 if 'unit' in options.test_filter: | 273 if 'unit' in options.test_filter: |
| 271 RunTestSuites(options, gtest_config.STABLE_TEST_SUITES) | 274 RunTestSuites(options, gtest_config.STABLE_TEST_SUITES) |
| 272 if 'ui' in options.test_filter: | 275 if 'ui' in options.test_filter: |
| 273 for test in INSTRUMENTATION_TESTS.itervalues(): | 276 for test in INSTRUMENTATION_TESTS.itervalues(): |
| 274 RunInstrumentationSuite(options, test) | 277 RunInstrumentationSuite(options, test) |
| 275 if 'webkit' in options.test_filter: | 278 if 'webkit' in options.test_filter: |
| 276 RunTestSuites(options, ['webkit_unit_tests', 'TestWebKitAPI']) | 279 RunTestSuites(options, [ |
| 280 gtest_config.Apk('webkit_unit_tests'), |
| 281 gtest_config.Apk('TestWebKitAPI'), |
| 282 ]) |
| 277 RunWebkitLint(options.target) | 283 RunWebkitLint(options.target) |
| 278 if 'webkit_layout' in options.test_filter: | 284 if 'webkit_layout' in options.test_filter: |
| 279 RunWebkitLayoutTests(options) | 285 RunWebkitLayoutTests(options) |
| 280 | 286 |
| 281 if options.experimental: | 287 if options.experimental: |
| 282 RunTestSuites(options, gtest_config.EXPERIMENTAL_TEST_SUITES) | 288 RunTestSuites(options, gtest_config.EXPERIMENTAL_TEST_SUITES) |
| 283 RunBrowserTestSuite(options) | 289 RunBrowserTestSuite(options) |
| 284 | 290 |
| 285 # Print logcat, kill logcat monitor | 291 # Print logcat, kill logcat monitor |
| 286 buildbot_report.PrintNamedStep('logcat_dump') | 292 buildbot_report.PrintNamedStep('logcat_dump') |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 'slave', 'android')) | 353 'slave', 'android')) |
| 348 if os.path.exists(build_internal_android): | 354 if os.path.exists(build_internal_android): |
| 349 android_paths.insert(0, build_internal_android) | 355 android_paths.insert(0, build_internal_android) |
| 350 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) | 356 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) |
| 351 | 357 |
| 352 MainTestWrapper(options) | 358 MainTestWrapper(options) |
| 353 | 359 |
| 354 | 360 |
| 355 if __name__ == '__main__': | 361 if __name__ == '__main__': |
| 356 sys.exit(main(sys.argv)) | 362 sys.exit(main(sys.argv)) |
| OLD | NEW |