Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/python | |
| 2 | |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 """ | |
| 8 Android buildbot steps. | |
| 9 """ | |
| 10 | |
| 11 import re | |
| 12 import sys | |
| 13 | |
| 14 import bot | |
| 15 | |
| 16 ANDROID_BUILDER = r'vm-android-(linux|mac|win)' | |
| 17 | |
| 18 def AndroidConfig(name, is_buildbot): | |
| 19 """Returns info for the current buildbot based on the name of the builder. | |
| 20 | |
| 21 Currently, this is just: | |
| 22 - mode: always "release" (for now) | |
| 23 - system: "linux", "mac", or "win" | |
| 24 """ | |
| 25 android_pattern = re.match(ANDROID_BUILDER, name) | |
| 26 if not android_pattern: | |
| 27 return None | |
| 28 | |
| 29 system = android_pattern.group(1) | |
| 30 if system == 'win': system = 'windows' | |
| 31 | |
| 32 return bot.BuildInfo('none', 'vm', 'release', system, checked=True) | |
| 33 | |
| 34 | |
| 35 def AndroidSteps(build_info): | |
| 36 # TODO(efortuna): Here's where we'll run tests. | |
| 37 #bot.RunTest('android', build_info, ['android']) | |
| 38 pass | |
| 39 | |
| 40 def BuildAndroid(build_info): | |
| 41 """ | |
| 42 Builds the android target. | |
| 43 | |
| 44 - build_info: the buildInfo object, containing information about what sort of | |
| 45 build and test to be run. | |
| 46 """ | |
| 47 with bot.BuildStep('Build Android'): | |
| 48 targets = ['dart'] | |
|
Emily Fortuna
2012/10/25 18:19:39
at graham's request -- pulling out the target(s) s
| |
| 49 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, | |
| 50 '--os=android ' + ' '.join(targets)] | |
| 51 print 'Building Android: %s' % (' '.join(args)) | |
| 52 bot.RunProcess(args) | |
| 53 | |
| 54 if __name__ == '__main__': | |
| 55 bot.RunBot(AndroidConfig, AndroidSteps, build_step=BuildAndroid) | |
| OLD | NEW |