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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 constants.CHROME_SHELL_HOST_DRIVEN_DIR), | 70 constants.CHROME_SHELL_HOST_DRIVEN_DIR), |
71 I('AndroidWebView', | 71 I('AndroidWebView', |
72 'AndroidWebView.apk', | 72 'AndroidWebView.apk', |
73 'org.chromium.android_webview.shell', | 73 'org.chromium.android_webview.shell', |
74 'AndroidWebViewTest', | 74 'AndroidWebViewTest', |
75 'webview:android_webview/test/data/device_files'), | 75 'webview:android_webview/test/data/device_files'), |
76 ]) | 76 ]) |
77 | 77 |
78 VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 'mojo', 'sync', | 78 VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 'mojo', 'sync', |
79 'telemetry_perf_unittests', 'ui', 'unit', 'webkit', | 79 'telemetry_perf_unittests', 'ui', 'unit', 'webkit', |
80 'webkit_layout']) | 80 'webkit_layout', 'python_unittests']) |
81 | 81 |
82 RunCmd = bb_utils.RunCmd | 82 RunCmd = bb_utils.RunCmd |
83 | 83 |
84 | 84 |
85 def _GetRevision(options): | 85 def _GetRevision(options): |
86 """Get the SVN revision number. | 86 """Get the SVN revision number. |
87 | 87 |
88 Args: | 88 Args: |
89 options: options object. | 89 options: options object. |
90 | 90 |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 RunCmd(['content/test/gpu/run_gpu_test.py', | 527 RunCmd(['content/test/gpu/run_gpu_test.py', |
528 'gpu_rasterization', | 528 'gpu_rasterization', |
529 '--browser', | 529 '--browser', |
530 'android-content-shell', | 530 'android-content-shell', |
531 '--build-revision', | 531 '--build-revision', |
532 str(revision), | 532 str(revision), |
533 '--test-machine-name', | 533 '--test-machine-name', |
534 EscapeBuilderName(builder_name)]) | 534 EscapeBuilderName(builder_name)]) |
535 | 535 |
536 | 536 |
| 537 def RunPythonUnitTests(_options): |
| 538 for suite in constants.PYTHON_UNIT_TEST_SUITES: |
| 539 bb_annotations.PrintNamedStep(suite) |
| 540 RunCmd(['build/android/test_runner.py', 'python', '-s', suite]) |
| 541 |
| 542 |
537 def GetTestStepCmds(): | 543 def GetTestStepCmds(): |
538 return [ | 544 return [ |
539 ('chromedriver', RunChromeDriverTests), | 545 ('chromedriver', RunChromeDriverTests), |
540 ('chrome_proxy', RunChromeProxyTests), | 546 ('chrome_proxy', RunChromeProxyTests), |
541 ('gpu', RunGPUTests), | 547 ('gpu', RunGPUTests), |
542 ('mojo', RunMojoTests), | 548 ('mojo', RunMojoTests), |
| 549 ('python_unittests', RunPythonUnitTests), |
543 ('sync', RunChromeSyncShellTests), | 550 ('sync', RunChromeSyncShellTests), |
544 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), | 551 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), |
545 ('ui', RunInstrumentationTests), | 552 ('ui', RunInstrumentationTests), |
546 ('unit', RunUnitTests), | 553 ('unit', RunUnitTests), |
547 ('webkit', RunWebkitTests), | 554 ('webkit', RunWebkitTests), |
548 ('webkit_layout', RunWebkitLayoutTests), | 555 ('webkit_layout', RunWebkitLayoutTests), |
549 ] | 556 ] |
550 | 557 |
551 | 558 |
552 def MakeGSPath(options, gs_base_dir): | 559 def MakeGSPath(options, gs_base_dir): |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 | 742 |
736 if options.coverage_bucket: | 743 if options.coverage_bucket: |
737 setattr(options, 'coverage_dir', | 744 setattr(options, 'coverage_dir', |
738 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 745 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
739 | 746 |
740 MainTestWrapper(options) | 747 MainTestWrapper(options) |
741 | 748 |
742 | 749 |
743 if __name__ == '__main__': | 750 if __name__ == '__main__': |
744 sys.exit(main(sys.argv)) | 751 sys.exit(main(sys.argv)) |
OLD | NEW |