Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 """ | 7 """ |
| 8 Pub buildbot steps. | 8 Pub buildbot steps. |
| 9 | 9 |
| 10 Runs tests for pub and the pub packages that are hosted in the main Dart repo. | 10 Runs tests for pub and the pub packages that are hosted in the main Dart repo. |
| 11 """ | 11 """ |
| 12 | 12 |
| 13 import re | 13 import re |
| 14 import sys | 14 import sys |
| 15 | 15 |
| 16 import bot | 16 import bot |
| 17 | 17 |
| 18 PUB_BUILDER = r'pub-(linux|mac|win)(-(russian))?' | 18 PUB_BUILDER = r'pub-(linux|mac|win)(-(russian))?(-(debug))?' |
| 19 | 19 |
| 20 def PubConfig(name, is_buildbot): | 20 def PubConfig(name, is_buildbot): |
| 21 """Returns info for the current buildbot based on the name of the builder. | 21 """Returns info for the current buildbot based on the name of the builder. |
| 22 | 22 |
| 23 Currently, this is just: | 23 Currently, this is just: |
| 24 - mode: always "release" | 24 - mode: "debug", "release" |
| 25 - system: "linux", "mac", or "win" | 25 - system: "linux", "mac", or "win" |
| 26 """ | 26 """ |
| 27 pub_pattern = re.match(PUB_BUILDER, name) | 27 pub_pattern = re.match(PUB_BUILDER, name) |
| 28 if not pub_pattern: | 28 if not pub_pattern: |
| 29 return None | 29 return None |
| 30 | 30 |
| 31 system = pub_pattern.group(1) | 31 system = pub_pattern.group(1) |
| 32 locale = pub_pattern.group(3) | 32 locale = pub_pattern.group(3) |
| 33 mode = pub_pattern.group(5) or 'release' | |
| 33 if system == 'win': system = 'windows' | 34 if system == 'win': system = 'windows' |
| 34 | 35 |
| 35 return bot.BuildInfo('none', 'vm', 'release', system, checked=True, | 36 return bot.BuildInfo('none', 'vm', mode, system, checked=True, |
| 36 builder_tag=locale) | 37 builder_tag=locale) |
| 37 | 38 |
| 38 | 39 |
| 39 def PubSteps(build_info): | 40 def PubSteps(build_info): |
| 40 with bot.BuildStep('Build package-root'): | 41 with bot.BuildStep('Build package-root'): |
| 41 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, | 42 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, |
| 42 'packages'] | 43 'packages'] |
| 43 print 'Building package-root: %s' % (' '.join(args)) | 44 print 'Building package-root: %s' % (' '.join(args)) |
| 44 bot.RunProcess(args) | 45 bot.RunProcess(args) |
| 45 | 46 |
| 46 common_args = ['--write-test-outcome-log'] | 47 common_args = ['--write-test-outcome-log'] |
| 47 if build_info.builder_tag: | 48 if build_info.builder_tag: |
| 48 common_args.append('--builder-tag=%s' % build_info.builder_tag) | 49 common_args.append('--builder-tag=%s' % build_info.builder_tag) |
| 49 | 50 |
| 50 bot.RunTest('pub', build_info, | 51 # Pub tests currently has a lot of timeouts when run in debug mode |
|
Bill Hesse
2014/04/28 10:53:44
currently have
| |
| 51 common_args + ['pub', 'pkg', 'docs']) | 52 # See issue 18479 |
| 53 if build_info.mode == 'release': | |
| 54 bot.RunTest('pub', build_info, | |
| 55 common_args + ['pub', 'pkg', 'docs']) | |
| 52 | 56 |
| 53 pkgbuild_build_info = bot.BuildInfo('none', 'vm', 'release', | 57 pkgbuild_build_info = bot.BuildInfo('none', 'vm', build_info.mode, |
| 54 build_info.system, checked=False) | 58 build_info.system, checked=False) |
| 55 bot.RunTest('pkgbuild_repo_pkgs', pkgbuild_build_info, | 59 bot.RunTest('pkgbuild_repo_pkgs', pkgbuild_build_info, |
| 56 common_args + ['--append_logs', '--use-repository-packages', 'pkgbuild']) | 60 common_args + ['--append_logs', '--use-repository-packages', 'pkgbuild']) |
| 57 bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, | 61 bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, |
| 58 common_args + ['--append_logs', '--use-public-packages', 'pkgbuild']) | 62 common_args + ['--append_logs', '--use-public-packages', 'pkgbuild']) |
| 59 | 63 |
| 60 if __name__ == '__main__': | 64 if __name__ == '__main__': |
| 61 bot.RunBot(PubConfig, PubSteps) | 65 bot.RunBot(PubConfig, PubSteps) |
| OLD | NEW |