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

Side by Side Diff: scripts/slave/recipe_modules/webrtc/api.py

Issue 2354363006: WebRTC: Add android_junit_tests. (Closed)
Patch Set: Rebase Created 4 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
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/webrtc/builders.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from recipe_engine.types import freeze 5 from recipe_engine.types import freeze
6 from recipe_engine import recipe_api 6 from recipe_engine import recipe_api
7 from . import builders 7 from . import builders
8 from . import steps 8 from . import steps
9 9
10 10
(...skipping 22 matching lines...) Expand all
33 'rtc_stats_unittests', 33 'rtc_stats_unittests',
34 'rtc_unittests', 34 'rtc_unittests',
35 'system_wrappers_unittests', 35 'system_wrappers_unittests',
36 'test_support_unittests', 36 'test_support_unittests',
37 'tools_unittests', 37 'tools_unittests',
38 'video_engine_tests', 38 'video_engine_tests',
39 'voice_engine_unittests', 39 'voice_engine_unittests',
40 'xmllite_xmpp_unittests', 40 'xmllite_xmpp_unittests',
41 ) 41 )
42 42
43 # Android APK tests. 43 ANDROID_DEVICE_TESTS = (
44 ANDROID_APK_TESTS = (
45 'audio_decoder_unittests', 44 'audio_decoder_unittests',
46 'common_audio_unittests', 45 'common_audio_unittests',
47 'common_video_unittests', 46 'common_video_unittests',
48 'modules_tests', 47 'modules_tests',
49 'modules_unittests', 48 'modules_unittests',
50 'peerconnection_unittests', 49 'peerconnection_unittests',
51 'rtc_stats_unittests', 50 'rtc_stats_unittests',
52 'rtc_unittests', 51 'rtc_unittests',
53 'system_wrappers_unittests', 52 'system_wrappers_unittests',
54 'test_support_unittests', 53 'test_support_unittests',
55 'tools_unittests', 54 'tools_unittests',
56 'video_engine_tests', 55 'video_engine_tests',
57 'voice_engine_unittests', 56 'voice_engine_unittests',
58 'webrtc_nonparallel_tests', 57 'webrtc_nonparallel_tests',
59 ) 58 )
60 59
60 ANDROID_LINUX_TESTS = (
61 'android_junit_tests',
62 )
63
61 ANDROID_INSTRUMENTATION_TESTS = ( 64 ANDROID_INSTRUMENTATION_TESTS = (
62 'AppRTCMobileTest', 65 'AppRTCMobileTest',
63 'libjingle_peerconnection_android_unittest', 66 'libjingle_peerconnection_android_unittest',
64 ) 67 )
65 68
66 DASHBOARD_UPLOAD_URL = 'https://chromeperf.appspot.com' 69 DASHBOARD_UPLOAD_URL = 'https://chromeperf.appspot.com'
67 70
68 @property 71 @property
69 def should_build(self): 72 def should_build(self):
70 return self.bot_type in ('builder', 'builder_tester') 73 return self.bot_type in ('builder', 'builder_tester')
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 self.m.gclient.apply_config(c) 124 self.m.gclient.apply_config(c)
122 125
123 if self.m.tryserver.is_tryserver: 126 if self.m.tryserver.is_tryserver:
124 self.m.chromium.apply_config('trybot_flavor') 127 self.m.chromium.apply_config('trybot_flavor')
125 128
126 def configure_swarming(self): 129 def configure_swarming(self):
127 self.c.use_isolate = self.bot_config.get('use_isolate') 130 self.c.use_isolate = self.bot_config.get('use_isolate')
128 self.c.enable_swarming = self.bot_config.get('enable_swarming') 131 self.c.enable_swarming = self.bot_config.get('enable_swarming')
129 if self.c.use_isolate: 132 if self.c.use_isolate:
130 self.m.isolate.set_isolate_environment(self.m.chromium.c) 133 self.m.isolate.set_isolate_environment(self.m.chromium.c)
134 self._isolated_targets = tuple()
131 if self.c.TEST_SUITE == 'webrtc': 135 if self.c.TEST_SUITE == 'webrtc':
132 self._isolated_targets = self.NORMAL_TESTS 136 self._isolated_targets += self.NORMAL_TESTS
133 elif self.c.TEST_SUITE == 'android': 137 if self.c.TEST_SUITE in ('android_linux', 'android_swarming'):
134 self._isolated_targets = (self.ANDROID_APK_TESTS + 138 self._isolated_targets += self.ANDROID_LINUX_TESTS
139 if self.c.TEST_SUITE in ('android_device', 'android_swarming'):
140 self._isolated_targets += (self.ANDROID_DEVICE_TESTS +
135 self.ANDROID_INSTRUMENTATION_TESTS) 141 self.ANDROID_INSTRUMENTATION_TESTS)
136 else: # pragma: no cover 142 if not self._isolated_targets: # pragma: no cover
137 raise self.m.step.StepFailure('Isolation and swarming are only ' 143 raise self.m.step.StepFailure('Isolation and swarming are only '
138 'supported for webrtc and android test ' 144 'supported for webrtc, android_linux and '
139 'suites.') 145 'android_device test suites.')
140 146
141 self.c.enable_swarming = self.bot_config.get('enable_swarming') 147 self.c.enable_swarming = self.bot_config.get('enable_swarming')
142 if self.c.enable_swarming: 148 if self.c.enable_swarming:
143 self.m.chromium_swarming.configure_swarming( 149 self.m.chromium_swarming.configure_swarming(
144 'webrtc', 150 'webrtc',
145 precommit=self.m.tryserver.is_tryserver, 151 precommit=self.m.tryserver.is_tryserver,
146 mastername=self.mastername) 152 mastername=self.mastername)
147 self.m.swarming.set_default_dimension( 153 self.m.swarming.set_default_dimension(
148 'os', 154 'os',
149 self.m.swarming.prefered_os_dimension( 155 self.m.swarming.prefered_os_dimension(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 with self.m.step.context(context): 202 with self.m.step.context(context):
197 if self.c.use_isolate: 203 if self.c.use_isolate:
198 self.m.isolate.remove_build_metadata() 204 self.m.isolate.remove_build_metadata()
199 self.m.isolate.isolate_tests(self.m.chromium.output_dir, 205 self.m.isolate.isolate_tests(self.m.chromium.output_dir,
200 targets=self._isolated_targets) 206 targets=self._isolated_targets)
201 207
202 tests = steps.generate_tests(self, self.c.TEST_SUITE, self.revision, 208 tests = steps.generate_tests(self, self.c.TEST_SUITE, self.revision,
203 self.c.enable_swarming) 209 self.c.enable_swarming)
204 with self.m.step.defer_results(): 210 with self.m.step.defer_results():
205 if tests: 211 if tests:
206 if (self.m.chromium.c.TARGET_PLATFORM == 'android' and 212 run_android_device_steps = (not self.c.enable_swarming and
207 not self.c.enable_swarming): 213 self.m.chromium.c.TARGET_PLATFORM == 'android' and
214 self.c.TEST_SUITE != 'android_linux')
215
216 if run_android_device_steps:
208 self.m.chromium_android.common_tests_setup_steps() 217 self.m.chromium_android.common_tests_setup_steps()
209 218
210 for test in tests: 219 for test in tests:
211 test.run(self, suffix='') 220 test.run(self, suffix='')
212 221
213 if (self.m.chromium.c.TARGET_PLATFORM == 'android' and 222 if run_android_device_steps:
214 not self.c.enable_swarming):
215 self.m.chromium_android.shutdown_device_monitor() 223 self.m.chromium_android.shutdown_device_monitor()
216 self.m.chromium_android.logcat_dump( 224 self.m.chromium_android.logcat_dump(
217 gs_bucket=self.master_config.get('build_gs_bucket')) 225 gs_bucket=self.master_config.get('build_gs_bucket'))
218 self.m.chromium_android.stack_tool_steps(force_latest_version=True) 226 self.m.chromium_android.stack_tool_steps(force_latest_version=True)
219 self.m.chromium_android.test_report() 227 self.m.chromium_android.test_report()
220 228
221 with self.m.step.defer_results(): 229 with self.m.step.defer_results():
222 for test in tests: 230 for test in tests:
223 if test.enable_swarming: 231 if test.enable_swarming:
224 self.m.swarming.collect_task(test.swarming_task) 232 self.m.swarming.collect_task(test.swarming_task)
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 def clean_test_output(self): 349 def clean_test_output(self):
342 """Remove all test output in out/, since we have tests leaking files.""" 350 """Remove all test output in out/, since we have tests leaking files."""
343 out_dir = self.m.path['checkout'].join('out') 351 out_dir = self.m.path['checkout'].join('out')
344 self.m.python('clean test output files', 352 self.m.python('clean test output files',
345 script=self.resource('cleanup_files.py'), 353 script=self.resource('cleanup_files.py'),
346 args=[out_dir], 354 args=[out_dir],
347 infra_step=True) 355 infra_step=True)
348 356
349 def virtual_webcam_check(self): 357 def virtual_webcam_check(self):
350 self.m.python('webcam_check', self.resource('ensure_webcam_is_running.py')) 358 self.m.python('webcam_check', self.resource('ensure_webcam_is_running.py'))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/webrtc/builders.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698