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 Pkg 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 packages that are hosted in the main Dart repo and in |
| 11 third_party/pkg_tested. |
11 """ | 12 """ |
12 | 13 |
13 import re | 14 import re |
14 import sys | 15 import sys |
15 | 16 |
16 import bot | 17 import bot |
17 | 18 |
18 PUB_BUILDER = r'pub-(linux|mac|win)(-(russian))?(-(debug))?' | 19 PKG_BUILDER = r'pkg-(linux|mac|win)(-(russian))?(-(debug))?' |
19 | 20 |
20 def PubConfig(name, is_buildbot): | 21 def PkgConfig(name, is_buildbot): |
21 """Returns info for the current buildbot based on the name of the builder. | 22 """Returns info for the current buildbot based on the name of the builder. |
22 | 23 |
23 Currently, this is just: | 24 Currently, this is just: |
24 - mode: "debug", "release" | 25 - mode: "debug", "release" |
25 - system: "linux", "mac", or "win" | 26 - system: "linux", "mac", or "win" |
26 """ | 27 """ |
27 pub_pattern = re.match(PUB_BUILDER, name) | 28 pkg_pattern = re.match(PKG_BUILDER, name) |
28 if not pub_pattern: | 29 if not pkg_pattern: |
29 return None | 30 return None |
30 | 31 |
31 system = pub_pattern.group(1) | 32 system = pkg_pattern.group(1) |
32 locale = pub_pattern.group(3) | 33 locale = pkg_pattern.group(3) |
33 mode = pub_pattern.group(5) or 'release' | 34 mode = pkg_pattern.group(5) or 'release' |
34 if system == 'win': system = 'windows' | 35 if system == 'win': system = 'windows' |
35 | 36 |
36 return bot.BuildInfo('none', 'vm', mode, system, checked=True, | 37 return bot.BuildInfo('none', 'vm', mode, system, checked=True, |
37 builder_tag=locale) | 38 builder_tag=locale) |
38 | 39 |
39 def PubSteps(build_info): | 40 def PkgSteps(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 # There are a number of big/integration tests in pkg, run with bigger timeout | 51 # There are a number of big/integration tests in pkg, run with bigger timeout |
51 common_args.append('--timeout=120') | 52 common_args.append('--timeout=120') |
52 # We have some unreproducible vm crashes on these bots | 53 # We have some unreproducible vm crashes on these bots |
53 common_args.append('--copy-coredumps') | 54 common_args.append('--copy-coredumps') |
54 | 55 |
| 56 # We are seeing issues with pub get calls on the windows bots. |
| 57 # Experiment with not running concurrent calls. |
55 if build_info.system == 'windows': | 58 if build_info.system == 'windows': |
56 common_args.append('-j1') | 59 common_args.append('-j1') |
57 if build_info.mode == 'release': | 60 if build_info.mode == 'release': |
58 bot.RunTest('pub and pkg ', build_info, | 61 bot.RunTest('pkg ', build_info, |
59 common_args + ['pub', 'pkg', 'docs', 'pkg_tested'], | 62 common_args + ['pkg', 'docs', 'pkg_tested'], |
60 swallow_error=True) | 63 swallow_error=True) |
61 else: | 64 else: |
62 # Pub tests currently have a lot of timeouts when run in debug mode. | 65 # Pkg tests currently have a lot of timeouts when run in debug mode. |
63 # See issue 18479 | 66 # See issue 18479 |
64 bot.RunTest('pub and pkg', build_info, common_args + ['pkg', 'docs'], | 67 bot.RunTest('pkg', build_info, common_args + ['pkg', 'docs'], |
65 swallow_error=True) | 68 swallow_error=True) |
66 | 69 |
67 if build_info.mode == 'release': | 70 if build_info.mode == 'release': |
68 pkgbuild_build_info = bot.BuildInfo('none', 'vm', build_info.mode, | 71 pkgbuild_build_info = bot.BuildInfo('none', 'vm', build_info.mode, |
69 build_info.system, checked=False) | 72 build_info.system, checked=False) |
70 bot.RunTest('pkgbuild_repo_pkgs', pkgbuild_build_info, | 73 bot.RunTest('pkgbuild_repo_pkgs', pkgbuild_build_info, |
71 common_args + ['--append_logs', '--use-repository-packages', | 74 common_args + ['--append_logs', '--use-repository-packages', |
72 'pkgbuild'], | 75 'pkgbuild'], |
73 swallow_error=True) | 76 swallow_error=True) |
74 | 77 |
75 # We are seeing issues with pub get calls on the windows bots. | |
76 # Experiment with not running concurrent calls. | |
77 public_args = (common_args + | 78 public_args = (common_args + |
78 ['--append_logs', '--use-public-packages', 'pkgbuild']) | 79 ['--append_logs', '--use-public-packages', 'pkgbuild']) |
79 bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, public_args) | 80 bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, public_args) |
80 | 81 |
81 if __name__ == '__main__': | 82 if __name__ == '__main__': |
82 bot.RunBot(PubConfig, PubSteps) | 83 bot.RunBot(PkgConfig, PkgSteps) |
OLD | NEW |