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

Side by Side Diff: tools/bots/pkg.py

Issue 1214343004: Run pub tests on the pub bots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Use the right dart_style version. Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « tools/bots/bot.py ('k') | tools/bots/pub.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Pkg buildbot steps. 8 Pkg buildbot steps.
9 9
10 Runs tests for packages that are hosted in the main Dart repo and in 10 Runs tests for packages that are hosted in the main Dart repo and in
11 third_party/pkg_tested. 11 third_party/pkg_tested.
12 """ 12 """
13 13
14 import os
14 import re 15 import re
15 import sys 16 import sys
16 17
17 import bot 18 import bot
18 19
19 PKG_BUILDER = r'pkg-(linux|mac|win)(-(russian))?(-(debug))?' 20 PKG_BUILDER = r'pkg-(linux|mac|win)(-(russian))?(-(debug))?'
20 21
21 def PkgConfig(name, is_buildbot): 22 def PkgConfig(name, is_buildbot):
22 """Returns info for the current buildbot based on the name of the builder. 23 """Returns info for the current buildbot based on the name of the builder.
23 24
24 Currently, this is just: 25 Currently, this is just:
25 - mode: "debug", "release" 26 - mode: "debug", "release"
26 - system: "linux", "mac", or "win" 27 - system: "linux", "mac", or "win"
27 """ 28 """
28 pkg_pattern = re.match(PKG_BUILDER, name) 29 pkg_pattern = re.match(PKG_BUILDER, name)
29 if not pkg_pattern: 30 if not pkg_pattern:
30 return None 31 return None
31 32
32 system = pkg_pattern.group(1) 33 system = pkg_pattern.group(1)
33 locale = pkg_pattern.group(3) 34 locale = pkg_pattern.group(3)
34 mode = pkg_pattern.group(5) or 'release' 35 mode = pkg_pattern.group(5) or 'release'
35 if system == 'win': system = 'windows' 36 if system == 'win': system = 'windows'
36 37
37 return bot.BuildInfo('none', 'vm', mode, system, checked=True, 38 return bot.BuildInfo('none', 'vm', mode, system, checked=True,
38 builder_tag=locale) 39 builder_tag=locale)
39 40
40 def PkgSteps(build_info): 41 def PkgSteps(build_info):
41 with bot.BuildStep('Build package-root'):
42 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode,
43 'packages']
44 print 'Building package-root: %s' % (' '.join(args))
45 bot.RunProcess(args)
46
47 common_args = ['--write-test-outcome-log'] 42 common_args = ['--write-test-outcome-log']
48 if build_info.builder_tag: 43 if build_info.builder_tag:
49 common_args.append('--builder-tag=%s' % build_info.builder_tag) 44 common_args.append('--builder-tag=%s' % build_info.builder_tag)
50 45
51 # There are a number of big/integration tests in pkg, run with bigger timeout 46 # There are a number of big/integration tests in pkg, run with bigger timeout
52 common_args.append('--timeout=120') 47 common_args.append('--timeout=120')
53 # We have some unreproducible vm crashes on these bots 48 # We have some unreproducible vm crashes on these bots
54 common_args.append('--copy-coredumps') 49 common_args.append('--copy-coredumps')
55 50
56 # We are seeing issues with pub get calls on the windows bots. 51 # We are seeing issues with pub get calls on the windows bots.
57 # Experiment with not running concurrent calls. 52 # Experiment with not running concurrent calls.
58 if build_info.system == 'windows': 53 if build_info.system == 'windows':
59 common_args.append('-j1') 54 common_args.append('-j1')
60 if build_info.mode == 'release':
61 bot.RunTest('pkg ', build_info,
62 common_args + ['pkg', 'docs', 'pkg_tested'],
63 swallow_error=True)
64 else:
65 # Pkg tests currently have a lot of timeouts when run in debug mode.
66 # See issue 18479
67 bot.RunTest('pkg', build_info, common_args + ['pkg', 'docs'],
68 swallow_error=True)
69 55
70 if build_info.mode == 'release': 56 bot.RunTest('pkg ', build_info,
71 pkgbuild_build_info = bot.BuildInfo('none', 'vm', build_info.mode, 57 common_args + ['pkg', 'docs'],
72 build_info.system, checked=False) 58 swallow_error=True)
73 bot.RunTest('pkgbuild_repo_pkgs', pkgbuild_build_info,
74 common_args + ['--append_logs', '--use-repository-packages',
75 'pkgbuild'],
76 swallow_error=True)
77 59
78 public_args = (common_args + 60 # Pkg tests currently have a lot of timeouts when run in debug mode.
79 ['--append_logs', '--use-public-packages', 'pkgbuild']) 61 # See issue 18479
80 bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, public_args) 62 if build_info.mode != 'release': return
63
64 with bot.BuildStep('third_party pkg tests', swallow_error=True):
65 pkg_tested = os.path.join('third_party', 'pkg_tested')
66 for entry in os.listdir(pkg_tested):
67 path = os.path.join(pkg_tested, entry)
68 if os.path.isdir(path): bot.RunTestRunner(build_info, path)
69
70 pkgbuild_build_info = bot.BuildInfo('none', 'vm', build_info.mode,
71 build_info.system, checked=False)
72 bot.RunTest('pkgbuild_repo_pkgs', pkgbuild_build_info,
73 common_args + ['--append_logs', '--use-repository-packages',
74 'pkgbuild'],
75 swallow_error=True)
76
77 public_args = (common_args +
78 ['--append_logs', '--use-public-packages', 'pkgbuild'])
79 bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, public_args)
81 80
82 if __name__ == '__main__': 81 if __name__ == '__main__':
83 bot.RunBot(PkgConfig, PkgSteps) 82 bot.RunBot(PkgConfig, PkgSteps)
OLDNEW
« no previous file with comments | « tools/bots/bot.py ('k') | tools/bots/pub.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698