Chromium Code Reviews| 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 hashlib | 8 import hashlib |
| 9 import json | 9 import json |
| 10 import os | 10 import os |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 # associated with it. | 279 # associated with it. |
| 280 args.append('--official-build') | 280 args.append('--official-build') |
| 281 | 281 |
| 282 RunCmd(['build/android/test_runner.py', 'instrumentation'] + args, | 282 RunCmd(['build/android/test_runner.py', 'instrumentation'] + args, |
| 283 flunk_on_failure=flunk_on_failure) | 283 flunk_on_failure=flunk_on_failure) |
| 284 | 284 |
| 285 | 285 |
| 286 def RunWebkitLint(target): | 286 def RunWebkitLint(target): |
| 287 """Lint WebKit's TestExpectation files.""" | 287 """Lint WebKit's TestExpectation files.""" |
| 288 bb_annotations.PrintNamedStep('webkit_lint') | 288 bb_annotations.PrintNamedStep('webkit_lint') |
| 289 RunCmd([SrcPath('webkit/tools/layout_tests/run_webkit_tests.py'), | 289 RunCmd([SrcPath('third_party/WebKit/Tools/Scripts/lint-test-expectations'), |
| 290 '--lint-test-files', | |
| 291 '--chromium', | |
| 292 '--target', target]) | 290 '--target', target]) |
| 293 | 291 |
| 294 | 292 |
| 295 def RunWebkitLayoutTests(options): | 293 def RunWebkitLayoutTests(options): |
| 296 """Run layout tests on an actual device.""" | 294 """Run layout tests on an actual device.""" |
| 297 bb_annotations.PrintNamedStep('webkit_tests') | 295 bb_annotations.PrintNamedStep('webkit_tests') |
| 298 cmd_args = [ | 296 cmd_args = [ |
| 299 '--no-show-results', | 297 '--no-show-results', |
| 300 '--no-new-test-results', | 298 '--no-new-test-results', |
| 301 '--full-results-html', | 299 '--full-results-html', |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 319 for f in options.factory_properties.get('additional_expectations', []): | 317 for f in options.factory_properties.get('additional_expectations', []): |
| 320 cmd_args.extend( | 318 cmd_args.extend( |
| 321 ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)]) | 319 ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)]) |
| 322 | 320 |
| 323 # TODO(dpranke): Remove this block after | 321 # TODO(dpranke): Remove this block after |
| 324 # https://codereview.chromium.org/12927002/ lands. | 322 # https://codereview.chromium.org/12927002/ lands. |
| 325 for f in options.factory_properties.get('additional_expectations_files', []): | 323 for f in options.factory_properties.get('additional_expectations_files', []): |
| 326 cmd_args.extend( | 324 cmd_args.extend( |
| 327 ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)]) | 325 ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)]) |
| 328 | 326 |
| 329 exit_code = RunCmd([SrcPath('webkit/tools/layout_tests/run_webkit_tests.py')] | 327 exit_code = RunCmd([ |
| 330 + cmd_args) | 328 SrcPath('third_party/WebKit/Tools/Scripts/run-webkit-tests')] + cmd_args) |
|
cmp
2014/09/24 18:14:01
+2 space indent here
but it's strange to break on
| |
| 331 if exit_code == 255: # test_run_results.UNEXPECTED_ERROR_EXIT_STATUS | 329 if exit_code == 255: # test_run_results.UNEXPECTED_ERROR_EXIT_STATUS |
| 332 bb_annotations.PrintMsg('?? (crashed or hung)') | 330 bb_annotations.PrintMsg('?? (crashed or hung)') |
| 333 elif exit_code == 254: # test_run_results.NO_DEVICES_EXIT_STATUS | 331 elif exit_code == 254: # test_run_results.NO_DEVICES_EXIT_STATUS |
| 334 bb_annotations.PrintMsg('?? (no devices found)') | 332 bb_annotations.PrintMsg('?? (no devices found)') |
| 335 elif exit_code == 253: # test_run_results.NO_TESTS_EXIT_STATUS | 333 elif exit_code == 253: # test_run_results.NO_TESTS_EXIT_STATUS |
| 336 bb_annotations.PrintMsg('?? (no tests found)') | 334 bb_annotations.PrintMsg('?? (no tests found)') |
| 337 else: | 335 else: |
| 338 full_results_path = os.path.join('..', 'layout-test-results', | 336 full_results_path = os.path.join('..', 'layout-test-results', |
| 339 'full_results.json') | 337 'full_results.json') |
| 340 if os.path.exists(full_results_path): | 338 if os.path.exists(full_results_path): |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 734 | 732 |
| 735 if options.coverage_bucket: | 733 if options.coverage_bucket: |
| 736 setattr(options, 'coverage_dir', | 734 setattr(options, 'coverage_dir', |
| 737 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 735 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
| 738 | 736 |
| 739 MainTestWrapper(options) | 737 MainTestWrapper(options) |
| 740 | 738 |
| 741 | 739 |
| 742 if __name__ == '__main__': | 740 if __name__ == '__main__': |
| 743 sys.exit(main(sys.argv)) | 741 sys.exit(main(sys.argv)) |
| OLD | NEW |