| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 """ | 161 """ |
| 162 buildbot_report.PrintNamedStep('%s_instrumentation_tests' % test.name.lower()) | 162 buildbot_report.PrintNamedStep('%s_instrumentation_tests' % test.name.lower()) |
| 163 | 163 |
| 164 InstallApk(options, test) | 164 InstallApk(options, test) |
| 165 args = ['--test-apk', test.test_apk, '--test_data', test.test_data, '-vvv', | 165 args = ['--test-apk', test.test_apk, '--test_data', test.test_data, '-vvv', |
| 166 '-I'] | 166 '-I'] |
| 167 if options.target == 'Release': | 167 if options.target == 'Release': |
| 168 args.append('--release') | 168 args.append('--release') |
| 169 if options.asan: | 169 if options.asan: |
| 170 args.append('--tool=asan') | 170 args.append('--tool=asan') |
| 171 if options.upload_to_flakiness_server: |
| 172 args.append('--flakiness-dashboard-server=' |
| 173 'chrome-android-staging-results.appspot.com') |
| 171 | 174 |
| 172 RunCmd(['build/android/run_instrumentation_tests.py'] + args) | 175 RunCmd(['build/android/run_instrumentation_tests.py'] + args) |
| 173 | 176 |
| 174 | 177 |
| 175 def RunWebkitLint(target): | 178 def RunWebkitLint(target): |
| 176 """Lint WebKit's TestExpectation files.""" | 179 """Lint WebKit's TestExpectation files.""" |
| 177 buildbot_report.PrintNamedStep('webkit_lint') | 180 buildbot_report.PrintNamedStep('webkit_lint') |
| 178 RunCmd(['webkit/tools/layout_tests/run_webkit_tests.py', | 181 RunCmd(['webkit/tools/layout_tests/run_webkit_tests.py', |
| 179 '--lint-test-files', | 182 '--lint-test-files', |
| 180 '--chromium', | 183 '--chromium', |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 help='Run experiemental tests') | 275 help='Run experiemental tests') |
| 273 parser.add_option('-f', '--test-filter', metavar='<filter>', default=[], | 276 parser.add_option('-f', '--test-filter', metavar='<filter>', default=[], |
| 274 action='append', | 277 action='append', |
| 275 help=('Run a test suite. Test suites: "%s"' % | 278 help=('Run a test suite. Test suites: "%s"' % |
| 276 '", "'.join(VALID_TESTS))) | 279 '", "'.join(VALID_TESTS))) |
| 277 parser.add_option('--asan', action='store_true', help='Run tests with asan.') | 280 parser.add_option('--asan', action='store_true', help='Run tests with asan.') |
| 278 parser.add_option('--install', metavar='<apk name>', | 281 parser.add_option('--install', metavar='<apk name>', |
| 279 help='Install an apk by name') | 282 help='Install an apk by name') |
| 280 parser.add_option('--reboot', action='store_true', | 283 parser.add_option('--reboot', action='store_true', |
| 281 help='Reboot devices before running tests') | 284 help='Reboot devices before running tests') |
| 285 parser.add_option('--upload-to-flakiness-server', action='store_true', |
| 286 help='Upload the results to the flakiness dashboard.') |
| 282 options, args = parser.parse_args(argv[1:]) | 287 options, args = parser.parse_args(argv[1:]) |
| 283 | 288 |
| 284 def ParserError(msg): | 289 def ParserError(msg): |
| 285 """We avoid parser.error because it calls sys.exit.""" | 290 """We avoid parser.error because it calls sys.exit.""" |
| 286 parser.print_help() | 291 parser.print_help() |
| 287 print >> sys.stderr, '\nERROR:', msg | 292 print >> sys.stderr, '\nERROR:', msg |
| 288 return 1 | 293 return 1 |
| 289 | 294 |
| 290 if args: | 295 if args: |
| 291 return ParserError('Unused args %s' % args) | 296 return ParserError('Unused args %s' % args) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 305 'slave', 'android')) | 310 'slave', 'android')) |
| 306 if os.path.exists(build_internal_android): | 311 if os.path.exists(build_internal_android): |
| 307 android_paths.insert(0, build_internal_android) | 312 android_paths.insert(0, build_internal_android) |
| 308 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) | 313 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) |
| 309 | 314 |
| 310 MainTestWrapper(options) | 315 MainTestWrapper(options) |
| 311 | 316 |
| 312 | 317 |
| 313 if __name__ == '__main__': | 318 if __name__ == '__main__': |
| 314 sys.exit(main(sys.argv)) | 319 sys.exit(main(sys.argv)) |
| OLD | NEW |