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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 510 RunCmd(['content/test/gpu/run_gpu_test.py', | 510 RunCmd(['content/test/gpu/run_gpu_test.py', |
| 511 'gpu_rasterization', '-v', | 511 'gpu_rasterization', '-v', |
| 512 '--browser', | 512 '--browser', |
| 513 'android-content-shell', | 513 'android-content-shell', |
| 514 '--build-revision', | 514 '--build-revision', |
| 515 str(revision), | 515 str(revision), |
| 516 '--test-machine-name', | 516 '--test-machine-name', |
| 517 EscapeBuilderName(builder_name)]) | 517 EscapeBuilderName(builder_name)]) |
| 518 | 518 |
| 519 | 519 |
| 520 def RunPythonUnitTests(_options): | 520 def RunPythonUnitTests(_options): # pylint: disable=unused-argument |
| 521 for suite in constants.PYTHON_UNIT_TEST_SUITES: | 521 for suite in constants.PYTHON_UNIT_TEST_SUITES: |
| 522 bb_annotations.PrintNamedStep(suite) | 522 bb_annotations.PrintNamedStep(suite) |
| 523 RunCmd(['build/android/test_runner.py', 'python', '-s', suite]) | 523 RunCmd(['build/android/test_runner.py', 'python', '-s', suite]) |
| 524 | 524 |
| 525 | 525 |
| 526 def GetTestStepCmds(): | 526 def GetTestStepCmds(): |
| 527 return [ | 527 return [ |
| 528 ('base_junit_tests', | 528 ('base_junit_tests', |
| 529 lambda _options: RunJunitSuite('base_junit_tests')), | 529 lambda _options: RunJunitSuite('base_junit_tests')), |
| 530 ('chromedriver', RunChromeDriverTests), | 530 ('chromedriver', RunChromeDriverTests), |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 717 | 717 |
| 718 if args: | 718 if args: |
| 719 return sys.exit('Unused args %s' % args) | 719 return sys.exit('Unused args %s' % args) |
| 720 | 720 |
| 721 unknown_tests = set(options.test_filter) - VALID_TESTS | 721 unknown_tests = set(options.test_filter) - VALID_TESTS |
| 722 if unknown_tests: | 722 if unknown_tests: |
| 723 return sys.exit('Unknown tests %s' % list(unknown_tests)) | 723 return sys.exit('Unknown tests %s' % list(unknown_tests)) |
| 724 | 724 |
| 725 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 725 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
| 726 | 726 |
| 727 # pylint: disable=global-statement | |
| 727 if options.chrome_output_dir: | 728 if options.chrome_output_dir: |
| 728 global CHROME_OUT_DIR | 729 global CHROME_OUT_DIR |
|
perezju
2015/09/04 09:01:53
Is there a reason why we really need this globals?
jbudorick
2015/09/04 16:51:55
No idea. These bb_* scripts are mostly unused with
perezju
2015/09/08 13:40:10
ok, sgtm
| |
| 729 global LOGCAT_DIR | 730 global LOGCAT_DIR |
| 730 CHROME_OUT_DIR = options.chrome_output_dir | 731 CHROME_OUT_DIR = options.chrome_output_dir |
| 731 LOGCAT_DIR = os.path.join(CHROME_OUT_DIR, 'logcat') | 732 LOGCAT_DIR = os.path.join(CHROME_OUT_DIR, 'logcat') |
| 732 | 733 |
| 733 if options.coverage_bucket: | 734 if options.coverage_bucket: |
| 734 setattr(options, 'coverage_dir', | 735 setattr(options, 'coverage_dir', |
| 735 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 736 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
| 736 | 737 |
| 737 MainTestWrapper(options) | 738 MainTestWrapper(options) |
| 738 | 739 |
| 739 | 740 |
| 740 if __name__ == '__main__': | 741 if __name__ == '__main__': |
| 741 sys.exit(main(sys.argv)) | 742 sys.exit(main(sys.argv)) |
| OLD | NEW |