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

Unified Diff: scripts/master/factory/webrtc_factory.py

Issue 11896066: Add Android NDK build for WebRTC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Added try builder Created 7 years, 10 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
Index: scripts/master/factory/webrtc_factory.py
diff --git a/scripts/master/factory/webrtc_factory.py b/scripts/master/factory/webrtc_factory.py
index f360ae9085c92af75120e1ca964a4e7bce9fc772..3d276b4afba4340b67701cf522e077a4fb36fe0f 100644
--- a/scripts/master/factory/webrtc_factory.py
+++ b/scripts/master/factory/webrtc_factory.py
@@ -4,7 +4,7 @@
from master.factory import gclient_factory
from master.factory import chromium_commands
-
+from master.factory import webrtc_commands
import config
@@ -17,7 +17,7 @@ class WebRTCFactory(gclient_factory.GClientFactory):
config.Master.trunk_url + '/deps/third_party/valgrind/binaries')
def __init__(self, build_dir, target_platform, svn_root_url, branch,
- custom_deps_list=None):
+ custom_deps_list=None, nohooks_on_update=False, target_os=None):
"""Creates a WebRTC factory.
This factory can also be used to build stand-alone projects.
@@ -31,6 +31,8 @@ class WebRTCFactory(gclient_factory.GClientFactory):
custom_deps_list: Content to be put in the custom_deps entry of the
.gclient file for the default solution. The parameter must be a list
of tuples with two strings in each: path and remote URL.
+ nohooks_on_update: If True, no hooks will be executed in the update step.
+ target_os: Used to sync down OS-specific dependencies, if specified.
"""
svn_url = svn_root_url + '/' + branch
# Use root_dir=src since many Chromium scripts rely on that path.
@@ -44,7 +46,9 @@ class WebRTCFactory(gclient_factory.GClientFactory):
config.Master.webrtc_internal_url, name='webrtc-internal',
custom_vars_list=custom_vars_list))
gclient_factory.GClientFactory.__init__(self, build_dir, solutions,
- target_platform=target_platform)
+ target_platform=target_platform,
+ nohooks_on_update=nohooks_on_update,
+ target_os=target_os)
def WebRTCFactory(self, target='Debug', clobber=False, tests=None, mode=None,
slave_type='BuilderTester', options=None,
@@ -83,3 +87,50 @@ class WebRTCFactory(gclient_factory.GClientFactory):
else:
cmds.AddAnnotatedGTestTestStep(test, factory_properties)
return factory
+
+ def WebRTCAndroidNDKFactory(self, annotation_script,
Isaac (away) 2013/03/18 17:54:21 I would rather us use ChromiumAnnotationFactory if
kjellander_chromium 2013/03/21 15:46:17 Due to the fact that the WebRTC NDK demo applicati
+ branch='master',
+ target='Release',
+ slave_type='AnnotatedBuilderTester',
+ clobber=False,
+ compile_timeout=6000,
+ project=None,
+ factory_properties=None, options=None,
+ tests=None,
+ gclient_deps=None):
+ """Annotation-driven factory to build WebRTC with the Android NDK.
+ """
+ factory_properties = factory_properties or {}
+ options = options or {}
+
+ factory = self.BuildFactory(target=target, clobber=clobber,
+ tests=tests, mode=None, slave_type=slave_type,
+ options=options,
+ compile_timeout=compile_timeout, build_url=None,
+ project=project,
+ factory_properties=factory_properties,
+ gclient_deps=gclient_deps)
+
+ # Get the factory command object to create new steps to the factory.
+ cmds = webrtc_commands.WebRTCCommands(
+ factory=factory,
+ target=target,
+ build_dir=self._build_dir,
+ target_platform=self._target_platform,
+ target_os=self._target_os)
+
+ # Add the main build.
+ env = factory_properties.get('annotation_env')
+ factory_properties['target'] = target
+ factory_properties.setdefault('clobber', clobber)
+ cmds.AddAnnotationStep('build', annotation_script, env=env,
+ factory_properties=factory_properties)
+
+ # Add compilation of NDK apps, assuming they can run as annotation scripts.
+ ndk_apps_list = factory_properties.get('ndk_apps')
+ if ndk_apps_list:
+ for ndk_app in ndk_apps_list:
+ cmds.AddAnnotationStep('ndk_app', ndk_app, env=env,
+ factory_properties=factory_properties)
+ return factory
+

Powered by Google App Engine
This is Rietveld 408576698