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

Unified Diff: scripts/slave/recipes/chromium.py

Issue 303513002: Initial work towards public Android recipes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: rebase Created 6 years, 7 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/slave/recipes/chromium.py
diff --git a/scripts/slave/recipes/chromium.py b/scripts/slave/recipes/chromium.py
index 8fe04511dc7efbcd0a59e258607cdf75cf1b5861..b777dbb5681139b95dd939a21e4c03fca7fe4ed3 100644
--- a/scripts/slave/recipes/chromium.py
+++ b/scripts/slave/recipes/chromium.py
@@ -6,6 +6,7 @@ DEPS = [
'archive',
'bot_update',
'chromium',
+ 'chromium_android',
'gclient',
'isolate',
'json',
@@ -67,6 +68,9 @@ class GTestTest(object):
self.flakiness_dash = flakiness_dash
def run(self, api):
+ if api.chromium.c.TARGET_PLATFORM == 'android':
+ return api.chromium_android.run_test_suite(self.name, self.args)
+
return api.chromium.runtest(self.name,
test_type=self.name,
args=self.args,
@@ -75,7 +79,10 @@ class GTestTest(object):
parallel=True,
flakiness_dash=self.flakiness_dash)
- def compile_targets(self, _):
+ def compile_targets(self, api):
+ if api.chromium.c.TARGET_PLATFORM == 'android':
+ return [self.name + '_apk']
+
return [self.name]
@@ -720,6 +727,68 @@ BUILDERS = {
'platform': 'linux',
},
},
+
+ 'Android Builder (dbg)': {
+ 'recipe_config': 'chromium_android',
+ 'chromium_config_kwargs': {
+ 'BUILD_CONFIG': 'Debug',
+ 'TARGET_BITS': 32,
+ 'TARGET_PLATFORM': 'android',
+ },
+ 'android_config': 'main_builder',
+ 'bot_type': 'builder',
+ 'testing': {
+ 'platform': 'linux',
+ },
+ },
+ 'Android Tests (dbg)': {
+ 'recipe_config': 'chromium_android',
+ 'chromium_config_kwargs': {
+ 'BUILD_CONFIG': 'Debug',
+ 'TARGET_BITS': 32,
+ 'TARGET_PLATFORM': 'android',
+ },
+ 'bot_type': 'tester',
+ 'parent_buildername': 'Android Builder (dbg)',
+ 'android_config': 'tests_base',
+ 'tests': [
+ GTestTest('base_unittests'),
+ ],
+ 'testing': {
+ 'platform': 'linux',
+ },
+ },
+
+ 'Android Builder': {
+ 'recipe_config': 'chromium_android',
+ 'chromium_config_kwargs': {
+ 'BUILD_CONFIG': 'Release',
+ 'TARGET_BITS': 32,
+ 'TARGET_PLATFORM': 'android',
+ },
+ 'android_config': 'main_builder',
+ 'bot_type': 'builder',
+ 'testing': {
+ 'platform': 'linux',
+ },
+ },
+ 'Android Tests': {
+ 'recipe_config': 'chromium_android',
+ 'chromium_config_kwargs': {
+ 'BUILD_CONFIG': 'Release',
+ 'TARGET_BITS': 32,
+ 'TARGET_PLATFORM': 'android',
+ },
+ 'bot_type': 'tester',
+ 'parent_buildername': 'Android Builder',
+ 'android_config': 'tests_base',
+ 'tests': [
+ GTestTest('base_unittests'),
+ ],
+ 'testing': {
+ 'platform': 'linux',
+ },
+ },
},
},
'chromium.mac': {
@@ -1471,6 +1540,11 @@ RECIPE_CONFIGS = {
'chromium_config': 'chromium',
'gclient_config': 'chromium',
},
+ 'chromium_android': {
+ 'chromium_config': 'android',
+ 'gclient_config': 'chromium',
+ 'gclient_apply_config': ['android'],
+ },
'chromium_clang': {
'chromium_config': 'chromium_clang',
'gclient_config': 'chromium',
@@ -1524,6 +1598,11 @@ def GenSteps(api):
for c in recipe_config.get('gclient_apply_config', []):
api.gclient.apply_config(c)
+ if 'android_config' in bot_config:
+ api.chromium_android.set_config(
+ bot_config['android_config'],
+ **bot_config.get('chromium_config_kwargs', {}))
Michael Achenbach 2014/05/28 14:23:27 Not totally sure how much sense it makes to add th
Paweł Hajdan Jr. 2014/05/30 09:49:00 Yes, android build is quite messy. It seems to me
+
if api.platform.is_win:
yield api.chromium.taskkill()
@@ -1571,6 +1650,12 @@ def GenSteps(api):
api.chromium.checkdeps(),
])
+ if api.chromium.c.TARGET_PLATFORM == 'android':
+ steps.extend([
+ api.chromium_android.checklicenses(),
+ api.chromium_android.findbugs(),
+ ])
+
if bot_type == 'builder':
steps.append(api.archive.zip_and_upload_build(
'package build',
@@ -1603,6 +1688,13 @@ def GenSteps(api):
# TODO(phajdan.jr): Move abort_on_failure to archive recipe module.
abort_on_failure=True))
+ if (api.chromium.c.TARGET_PLATFORM == 'android' and
+ bot_type in ['tester', 'builder_tester']):
+ steps.extend([
+ api.chromium_android.device_status_check(abort_on_failure=True),
+ api.chromium_android.provision_devices(abort_on_failure=True),
+ ])
+
test_steps = [t.run(api) for t in bot_config.get('tests', [])]
steps.extend(api.chromium.setup_tests(bot_type, test_steps))
@@ -1658,3 +1750,11 @@ def GenTests(api):
},
}))
)
+
+ yield (
+ api.test('findbugs_failure') +
+ api.properties.generic(mastername='chromium.linux',
+ buildername='Android Builder (dbg)') +
+ api.platform('linux', 32) +
+ api.step_data('findbugs', retcode=1)
+ )

Powered by Google App Engine
This is Rietveld 408576698