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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 for suite in suites: | 172 for suite in suites: |
173 bb_annotations.PrintNamedStep(suite) | 173 bb_annotations.PrintNamedStep(suite) |
174 cmd = [suite] + args | 174 cmd = [suite] + args |
175 cmd += suites_options.get(suite, []) | 175 cmd += suites_options.get(suite, []) |
176 if suite == 'content_browsertests' or suite == 'components_browsertests': | 176 if suite == 'content_browsertests' or suite == 'components_browsertests': |
177 cmd.append('--num_retries=1') | 177 cmd.append('--num_retries=1') |
178 _RunTest(options, cmd, suite) | 178 _RunTest(options, cmd, suite) |
179 | 179 |
180 | 180 |
| 181 def RunJunitSuite(suite): |
| 182 RunCmd(['build/android/test_runner.py', 'junit', '-s', suite]) |
| 183 |
| 184 |
181 def RunChromeDriverTests(options): | 185 def RunChromeDriverTests(options): |
182 """Run all the steps for running chromedriver tests.""" | 186 """Run all the steps for running chromedriver tests.""" |
183 bb_annotations.PrintNamedStep('chromedriver_annotation') | 187 bb_annotations.PrintNamedStep('chromedriver_annotation') |
184 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', | 188 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', |
185 '--android-packages=%s,%s,%s,%s' % | 189 '--android-packages=%s,%s,%s,%s' % |
186 ('chrome_shell', | 190 ('chrome_shell', |
187 'chrome_stable', | 191 'chrome_stable', |
188 'chrome_beta', | 192 'chrome_beta', |
189 'chromedriver_webview_shell'), | 193 'chromedriver_webview_shell'), |
190 '--revision=%s' % _GetRevision(options), | 194 '--revision=%s' % _GetRevision(options), |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 | 558 |
555 | 559 |
556 def RunPythonUnitTests(_options): | 560 def RunPythonUnitTests(_options): |
557 for suite in constants.PYTHON_UNIT_TEST_SUITES: | 561 for suite in constants.PYTHON_UNIT_TEST_SUITES: |
558 bb_annotations.PrintNamedStep(suite) | 562 bb_annotations.PrintNamedStep(suite) |
559 RunCmd(['build/android/test_runner.py', 'python', '-s', suite]) | 563 RunCmd(['build/android/test_runner.py', 'python', '-s', suite]) |
560 | 564 |
561 | 565 |
562 def GetTestStepCmds(): | 566 def GetTestStepCmds(): |
563 return [ | 567 return [ |
| 568 ('base_junit_tests', |
| 569 lambda _options: RunJunitSuite('base_junit_tests')), |
564 ('chromedriver', RunChromeDriverTests), | 570 ('chromedriver', RunChromeDriverTests), |
565 ('chrome_proxy', RunChromeProxyTests), | 571 ('chrome_proxy', RunChromeProxyTests), |
566 ('components_browsertests', | 572 ('components_browsertests', |
567 lambda options: RunTestSuites(options, ['components_browsertests'])), | 573 lambda options: RunTestSuites(options, ['components_browsertests'])), |
568 ('gpu', RunGPUTests), | 574 ('gpu', RunGPUTests), |
569 ('python_unittests', RunPythonUnitTests), | 575 ('python_unittests', RunPythonUnitTests), |
570 ('telemetry_unittests', RunTelemetryUnitTests), | 576 ('telemetry_unittests', RunTelemetryUnitTests), |
571 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), | 577 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), |
572 ('ui', RunInstrumentationTests), | 578 ('ui', RunInstrumentationTests), |
573 ('unit', RunUnitTests), | 579 ('unit', RunUnitTests), |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 | 771 |
766 if options.coverage_bucket: | 772 if options.coverage_bucket: |
767 setattr(options, 'coverage_dir', | 773 setattr(options, 'coverage_dir', |
768 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 774 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
769 | 775 |
770 MainTestWrapper(options) | 776 MainTestWrapper(options) |
771 | 777 |
772 | 778 |
773 if __name__ == '__main__': | 779 if __name__ == '__main__': |
774 sys.exit(main(sys.argv)) | 780 sys.exit(main(sys.argv)) |
OLD | NEW |