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

Unified Diff: scripts/slave/recipe_modules/webrtc/api.py

Issue 2354363006: WebRTC: Add android_junit_tests. (Closed)
Patch Set: Rebase Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/webrtc/builders.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/webrtc/api.py
diff --git a/scripts/slave/recipe_modules/webrtc/api.py b/scripts/slave/recipe_modules/webrtc/api.py
index 5a15c689a20ecd79555f5f16925016ded960bbb0..14cf5aec2a23f548351d5df19d858e15686a2348 100644
--- a/scripts/slave/recipe_modules/webrtc/api.py
+++ b/scripts/slave/recipe_modules/webrtc/api.py
@@ -40,8 +40,7 @@ class WebRTCApi(recipe_api.RecipeApi):
'xmllite_xmpp_unittests',
)
- # Android APK tests.
- ANDROID_APK_TESTS = (
+ ANDROID_DEVICE_TESTS = (
'audio_decoder_unittests',
'common_audio_unittests',
'common_video_unittests',
@@ -58,6 +57,10 @@ class WebRTCApi(recipe_api.RecipeApi):
'webrtc_nonparallel_tests',
)
+ ANDROID_LINUX_TESTS = (
+ 'android_junit_tests',
+ )
+
ANDROID_INSTRUMENTATION_TESTS = (
'AppRTCMobileTest',
'libjingle_peerconnection_android_unittest',
@@ -128,15 +131,18 @@ class WebRTCApi(recipe_api.RecipeApi):
self.c.enable_swarming = self.bot_config.get('enable_swarming')
if self.c.use_isolate:
self.m.isolate.set_isolate_environment(self.m.chromium.c)
+ self._isolated_targets = tuple()
if self.c.TEST_SUITE == 'webrtc':
- self._isolated_targets = self.NORMAL_TESTS
- elif self.c.TEST_SUITE == 'android':
- self._isolated_targets = (self.ANDROID_APK_TESTS +
+ self._isolated_targets += self.NORMAL_TESTS
+ if self.c.TEST_SUITE in ('android_linux', 'android_swarming'):
+ self._isolated_targets += self.ANDROID_LINUX_TESTS
+ if self.c.TEST_SUITE in ('android_device', 'android_swarming'):
+ self._isolated_targets += (self.ANDROID_DEVICE_TESTS +
self.ANDROID_INSTRUMENTATION_TESTS)
- else: # pragma: no cover
+ if not self._isolated_targets: # pragma: no cover
raise self.m.step.StepFailure('Isolation and swarming are only '
- 'supported for webrtc and android test '
- 'suites.')
+ 'supported for webrtc, android_linux and '
+ 'android_device test suites.')
self.c.enable_swarming = self.bot_config.get('enable_swarming')
if self.c.enable_swarming:
@@ -203,15 +209,17 @@ class WebRTCApi(recipe_api.RecipeApi):
self.c.enable_swarming)
with self.m.step.defer_results():
if tests:
- if (self.m.chromium.c.TARGET_PLATFORM == 'android' and
- not self.c.enable_swarming):
+ run_android_device_steps = (not self.c.enable_swarming and
+ self.m.chromium.c.TARGET_PLATFORM == 'android' and
+ self.c.TEST_SUITE != 'android_linux')
+
+ if run_android_device_steps:
self.m.chromium_android.common_tests_setup_steps()
for test in tests:
test.run(self, suffix='')
- if (self.m.chromium.c.TARGET_PLATFORM == 'android' and
- not self.c.enable_swarming):
+ if run_android_device_steps:
self.m.chromium_android.shutdown_device_monitor()
self.m.chromium_android.logcat_dump(
gs_bucket=self.master_config.get('build_gs_bucket'))
« 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