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

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

Issue 75163006: WebRTC Android APK trybot recipe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 1 month 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
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
new file mode 100644
index 0000000000000000000000000000000000000000..e52c1d07104ec2d73bf20df0559f7be6daa950bf
--- /dev/null
+++ b/scripts/slave/recipe_modules/webrtc/api.py
@@ -0,0 +1,76 @@
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from slave import recipe_api
+
+class WebRTCApi(recipe_api.RecipeApi):
+ def __init__(self, **kwargs):
+ super(WebRTCApi, self).__init__(**kwargs)
+ self._env = {}
+
+ def get_config_defaults(self):
+ return {
+ 'ANDROID_APK': False,
+ }
+
+ def get_normal_tests(self):
+ return [
+ 'audio_decoder_unittests',
+ 'common_audio_unittests',
+ 'common_video_unittests',
+ 'libjingle_media_unittest',
+ 'libjingle_p2p_unittest',
+ 'libjingle_peerconnection_unittest',
+ 'libjingle_sound_unittest',
+ 'libjingle_unittest',
+ 'metrics_unittests',
+ 'modules_tests',
+ 'modules_unittests',
+ 'neteq_unittests',
+ 'system_wrappers_unittests',
+ 'test_support_unittests',
+ 'tools_unittests',
+ 'video_engine_core_unittests',
+ 'video_engine_tests',
+ 'voice_engine_unittests',
+ ]
iannucci 2013/11/18 18:49:26 I would even just make this a class attribute NORM
kjellander_chromium 2013/11/20 14:29:16 Right, I don't remember why I put it into a method
+
+ def envsetup(self):
+ envsetup_cmd = [self.m.path.checkout('build', 'android', 'envsetup.sh')]
+ # TODO(kjellander): Add support for --target-arch flag to support
+ # non-ARM architecture.
+ cmd = ([self.m.path.build('scripts', 'slave', 'env_dump.py'),
+ '--output-json', self.m.json.output()] + envsetup_cmd)
+ yield self.m.step('envsetup', cmd, env=self._env)
iannucci 2013/11/18 18:49:26 envsetup makes me sad panda :( It would be super
kjellander_chromium 2013/11/20 14:29:16 I don't know the details about this. My primary ta
+
+ env_diff = self.m.step_history.last_step().json.output
+ for key, value in env_diff.iteritems():
+ self._env[key] = value
iannucci 2013/11/18 18:49:26 wdyt about putting this envsetup stuff in a 'base_
kjellander_chromium 2013/11/20 14:29:16 Yes, I'm doing that in the new patch set.
+
+ def runhooks(self, **kwargs):
+ kwargs['env'] = self._env
iannucci 2013/11/18 18:49:26 What do you think about kwargs.setdefault('env',
kjellander_chromium 2013/11/20 14:29:16 For now, I'll rather skip kwargs and let someone a
+ return self.m.chromium.runhooks(**kwargs)
+
+ def compile(self, **kwargs):
+ kwargs['env'] = self._env
+ return self.m.chromium.compile(**kwargs)
+
+ def apply_svn_patch(self):
+ script = self.m.path.build('scripts', 'slave', 'apply_svn_patch.py')
+ args = ['-p', self.m.properties['patch_url'],
+ '-r', self.c.patch_root_dir]
+
+ # Allow manipulating patches for try jobs.
+ if self.c.patch_path_filter_script and self.c.patch_path_filter:
+ args += ['--path-filter', self.c.patch_path_filter,
+ '--path-filter-script', self.c.patch_path_filter_script,
+ '--strip-level', self.c.patch_strip_level]
+ return self.m.python('apply_patch', script, args)
+
+ def runtests(self, test, **kwargs):
iannucci 2013/11/18 18:49:26 This should probably be test_runner. ('runtests' i
kjellander_chromium 2013/11/20 14:29:16 OK. I renamed it in the base_android/api.py
+ script = self.m.path.checkout('build', 'android', 'test_runner.py')
+ args = ['gtest', '-s', test, '--verbose']
+ if self.m.chromium.c.BUILD_CONFIG == 'Release':
+ args += ['--release']
+ return self.m.python(test, script, args, env=self._env)

Powered by Google App Engine
This is Rietveld 408576698