Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: build/android/buildbot/bb_device_steps.py

Issue 660023002: [Android] Test runner for python unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: + copyright header Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 RunCmd(['content/test/gpu/run_gpu_test.py', 524 RunCmd(['content/test/gpu/run_gpu_test.py',
525 'gpu_rasterization', 525 'gpu_rasterization',
526 '--browser', 526 '--browser',
527 'android-content-shell', 527 'android-content-shell',
528 '--build-revision', 528 '--build-revision',
529 str(revision), 529 str(revision),
530 '--test-machine-name', 530 '--test-machine-name',
531 EscapeBuilderName(builder_name)]) 531 EscapeBuilderName(builder_name)])
532 532
533 533
534 def RunPythonUnitTests(_options):
535 bb_annotations.PrintNamedStep('python_unittests')
536 RunCmd(['build/android/python_test_runner.py'])
537
538
534 def GetTestStepCmds(): 539 def GetTestStepCmds():
535 return [ 540 return [
536 ('chromedriver', RunChromeDriverTests), 541 ('chromedriver', RunChromeDriverTests),
537 ('chrome_proxy', RunChromeProxyTests), 542 ('chrome_proxy', RunChromeProxyTests),
538 ('gpu', RunGPUTests), 543 ('gpu', RunGPUTests),
539 ('mojo', RunMojoTests), 544 ('mojo', RunMojoTests),
545 ('python_unittests', RunPythonUnitTests),
klundberg 2014/10/16 17:50:15 Seems a little weird to run all Python unit tests
jbudorick 2014/10/16 17:55:07 That's reasonable. How would you suggest grouping
klundberg 2014/10/16 18:09:19 Not sure exactly what tests we have but something
540 ('sync', RunChromeSyncShellTests), 546 ('sync', RunChromeSyncShellTests),
541 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), 547 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests),
542 ('ui', RunInstrumentationTests), 548 ('ui', RunInstrumentationTests),
543 ('unit', RunUnitTests), 549 ('unit', RunUnitTests),
544 ('webkit', RunWebkitTests), 550 ('webkit', RunWebkitTests),
545 ('webkit_layout', RunWebkitLayoutTests), 551 ('webkit_layout', RunWebkitLayoutTests),
546 ] 552 ]
547 553
548 554
549 def MakeGSPath(options, gs_base_dir): 555 def MakeGSPath(options, gs_base_dir):
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 738
733 if options.coverage_bucket: 739 if options.coverage_bucket:
734 setattr(options, 'coverage_dir', 740 setattr(options, 'coverage_dir',
735 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) 741 os.path.join(CHROME_OUT_DIR, options.target, 'coverage'))
736 742
737 MainTestWrapper(options) 743 MainTestWrapper(options)
738 744
739 745
740 if __name__ == '__main__': 746 if __name__ == '__main__':
741 sys.exit(main(sys.argv)) 747 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/buildbot/bb_run_bot.py » ('j') | build/android/python_test_runner.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698