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

Unified Diff: tools/bots/android.py

Issue 11264019: Set up Android build config. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: tools/bots/android.py
===================================================================
--- tools/bots/android.py (revision 0)
+++ tools/bots/android.py (working copy)
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+
+# Copyright (c) 2012 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.
+
+"""
+Android buildbot steps.
+"""
+
+import re
+import sys
+
+import bot
+
+ANDROID_BUILDER = r'vm-android-(linux|mac|win)'
+
+def AndroidConfig(name, is_buildbot):
+ """Returns info for the current buildbot based on the name of the builder.
+
+ Currently, this is just:
+ - mode: always "release" (for now)
+ - system: "linux", "mac", or "win"
+ """
+ android_pattern = re.match(ANDROID_BUILDER, name)
+ if not android_pattern:
+ return None
+
+ system = android_pattern.group(1)
+ if system == 'win': system = 'windows'
+
+ return bot.BuildInfo('none', 'vm', 'release', system, checked=True)
+
+
+def AndroidSteps(build_info):
+ # Here's where we'll run tests.
Bob Nystrom 2012/10/25 00:49:16 Make this a TODO comment.
Emily Fortuna 2012/10/25 01:33:34 Done.
+ #bot.RunTest('android', build_info, ['android'])
+ pass
+
+def BuildAndroid(mode, system):
+ """
+ Builds the android target.
+
+ - mode: either 'debug' or 'release'
+ - system: the host system where we're building. Either 'linux', 'mac', or
+ 'win7'.
+ """
+ with bot.BuildStep('Build Android'):
+ args = [sys.executable, './tools/build.py', '--mode=' + mode,
+ '--os=android dart']
Bob Nystrom 2012/10/25 00:49:16 How about we add OS to BuildInfo and then have the
gram 2012/10/25 00:51:36 The target 'dart' here is going to change so we pr
Emily Fortuna 2012/10/25 01:33:34 @Bob, the difference is that the one in bot.py is
Bob Nystrom 2012/10/25 16:12:16 Ah, that makes sense. I didn't notice the target w
Emily Fortuna 2012/10/25 18:19:38 @Bob Apparently not (?) (Graham feel free to corre
+ print 'Building Android: %s' % (' '.join(args))
+ bot.RunProcess(args)
+
+if __name__ == '__main__':
+ bot.RunBot(AndroidConfig, AndroidSteps, build_step=BuildAndroid)

Powered by Google App Engine
This is Rietveld 408576698