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 multiprocessing | 10 import multiprocessing |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 'chrome:chrome/test/data/android/device_files', | 66 'chrome:chrome/test/data/android/device_files', |
67 constants.CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR), | 67 constants.CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR), |
68 I('AndroidWebView', | 68 I('AndroidWebView', |
69 'AndroidWebView.apk', | 69 'AndroidWebView.apk', |
70 'org.chromium.android_webview.shell', | 70 'org.chromium.android_webview.shell', |
71 'AndroidWebViewTest', | 71 'AndroidWebViewTest', |
72 'webview:android_webview/test/data/device_files'), | 72 'webview:android_webview/test/data/device_files'), |
73 ]) | 73 ]) |
74 | 74 |
75 VALID_TESTS = set(['chromedriver', 'gpu', 'ui', 'unit', 'webkit', | 75 VALID_TESTS = set(['chromedriver', 'gpu', 'ui', 'unit', 'webkit', |
76 'webkit_layout', 'webrtc']) | 76 'webkit_layout', 'webrtc_chromium', 'webrtc_native']) |
77 | 77 |
78 RunCmd = bb_utils.RunCmd | 78 RunCmd = bb_utils.RunCmd |
79 | 79 |
80 | 80 |
81 def _GetRevision(options): | 81 def _GetRevision(options): |
82 """Get the SVN revision number. | 82 """Get the SVN revision number. |
83 | 83 |
84 Args: | 84 Args: |
85 options: options object. | 85 options: options object. |
86 | 86 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 def RunInstrumentationTests(options): | 412 def RunInstrumentationTests(options): |
413 for test in INSTRUMENTATION_TESTS.itervalues(): | 413 for test in INSTRUMENTATION_TESTS.itervalues(): |
414 RunInstrumentationSuite(options, test) | 414 RunInstrumentationSuite(options, test) |
415 | 415 |
416 | 416 |
417 def RunWebkitTests(options): | 417 def RunWebkitTests(options): |
418 RunTestSuites(options, ['webkit_unit_tests']) | 418 RunTestSuites(options, ['webkit_unit_tests']) |
419 RunWebkitLint(options.target) | 419 RunWebkitLint(options.target) |
420 | 420 |
421 | 421 |
422 def RunWebRTCTests(options): | 422 def RunWebRTCChromiumTests(options): |
423 RunTestSuites(options, gtest_config.WEBRTC_TEST_SUITES) | 423 RunTestSuites(options, gtest_config.WEBRTC_CHROMIUM_TEST_SUITES) |
| 424 |
| 425 |
| 426 def RunWebRTCNativeTests(options): |
| 427 RunTestSuites(options, gtest_config.WEBRTC_NATIVE_TEST_SUITES) |
424 | 428 |
425 | 429 |
426 def RunGPUTests(options): | 430 def RunGPUTests(options): |
427 InstallApk(options, INSTRUMENTATION_TESTS['ContentShell'], False) | 431 InstallApk(options, INSTRUMENTATION_TESTS['ContentShell'], False) |
428 | 432 |
429 # Pixel tests require that the browser implements GrabWindowSnapshot and | 433 # Pixel tests require that the browser implements GrabWindowSnapshot and |
430 # GrabViewSnapshot, which android-content-shell currently does not. | 434 # GrabViewSnapshot, which android-content-shell currently does not. |
431 # (crbug.com/285932) | 435 # (crbug.com/285932) |
432 | 436 |
433 # bb_annotations.PrintNamedStep('gpu_tests') | 437 # bb_annotations.PrintNamedStep('gpu_tests') |
434 # RunCmd(['content/test/gpu/run_gpu_test', | 438 # RunCmd(['content/test/gpu/run_gpu_test', |
435 # '--browser=android-content-shell', 'pixel']) | 439 # '--browser=android-content-shell', 'pixel']) |
436 | 440 |
437 bb_annotations.PrintNamedStep('webgl_conformance_tests') | 441 bb_annotations.PrintNamedStep('webgl_conformance_tests') |
438 RunCmd(['content/test/gpu/run_gpu_test', | 442 RunCmd(['content/test/gpu/run_gpu_test', |
439 '--browser=android-content-shell', 'webgl_conformance', | 443 '--browser=android-content-shell', 'webgl_conformance', |
440 '--webgl-conformance-version=1.0.1']) | 444 '--webgl-conformance-version=1.0.1']) |
441 | 445 |
442 | 446 |
443 def GetTestStepCmds(): | 447 def GetTestStepCmds(): |
444 return [ | 448 return [ |
445 ('chromedriver', RunChromeDriverTests), | 449 ('chromedriver', RunChromeDriverTests), |
446 ('gpu', RunGPUTests), | 450 ('gpu', RunGPUTests), |
447 ('unit', RunUnitTests), | 451 ('unit', RunUnitTests), |
448 ('ui', RunInstrumentationTests), | 452 ('ui', RunInstrumentationTests), |
449 ('webkit', RunWebkitTests), | 453 ('webkit', RunWebkitTests), |
450 ('webkit_layout', RunWebkitLayoutTests), | 454 ('webkit_layout', RunWebkitLayoutTests), |
451 ('webrtc', RunWebRTCTests), | 455 ('webrtc_chromium', RunWebRTCChromiumTests), |
| 456 ('webrtc_native', RunWebRTCNativeTests), |
452 ] | 457 ] |
453 | 458 |
454 | 459 |
455 def UploadHTML(options, gs_base_dir, dir_to_upload, link_text, | 460 def UploadHTML(options, gs_base_dir, dir_to_upload, link_text, |
456 link_rel_path='index.html', gs_url=GS_URL): | 461 link_rel_path='index.html', gs_url=GS_URL): |
457 """Uploads directory at |dir_to_upload| to Google Storage and output a link. | 462 """Uploads directory at |dir_to_upload| to Google Storage and output a link. |
458 | 463 |
459 Args: | 464 Args: |
460 options: Command line options. | 465 options: Command line options. |
461 gs_base_dir: The Google Storage base directory (e.g. | 466 gs_base_dir: The Google Storage base directory (e.g. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 589 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
585 if options.coverage_bucket: | 590 if options.coverage_bucket: |
586 setattr(options, 'coverage_dir', | 591 setattr(options, 'coverage_dir', |
587 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 592 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
588 | 593 |
589 MainTestWrapper(options) | 594 MainTestWrapper(options) |
590 | 595 |
591 | 596 |
592 if __name__ == '__main__': | 597 if __name__ == '__main__': |
593 sys.exit(main(sys.argv)) | 598 sys.exit(main(sys.argv)) |
OLD | NEW |