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

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

Issue 11442051: Make sure the '--append_flaky_log' flag is set on all test.py calls except for the first one (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 Dart2js buildbot steps 8 Dart2js buildbot steps
9 9
10 Runs tests for the dart2js compiler. 10 Runs tests for the dart2js compiler.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 def NeedsXterm(compiler, runtime): 92 def NeedsXterm(compiler, runtime):
93 return runtime in ['ie9', 'ie10', 'chrome', 'safari', 'opera', 'ff', 'drt'] 93 return runtime in ['ie9', 'ie10', 'chrome', 'safari', 'opera', 'ff', 'drt']
94 94
95 95
96 def TestStepName(name, flags): 96 def TestStepName(name, flags):
97 # Filter out flags with '=' as this breaks the /stats feature of the 97 # Filter out flags with '=' as this breaks the /stats feature of the
98 # build bot. 98 # build bot.
99 flags = [x for x in flags if not '=' in x] 99 flags = [x for x in flags if not '=' in x]
100 return ('%s tests %s' % (name, ' '.join(flags))).strip() 100 return ('%s tests %s' % (name, ' '.join(flags))).strip()
101 101
102 102 IsFirstTestStepCall = True
103 def TestStep(name, mode, system, compiler, runtime, targets, flags): 103 def TestStep(name, mode, system, compiler, runtime, targets, flags):
104 step_name = TestStepName(name, flags) 104 step_name = TestStepName(name, flags)
105 with bot.BuildStep(step_name, swallow_error=True): 105 with bot.BuildStep(step_name, swallow_error=True):
106 sys.stdout.flush() 106 sys.stdout.flush()
107 if NeedsXterm(compiler, runtime) and system == 'linux': 107 if NeedsXterm(compiler, runtime) and system == 'linux':
108 cmd = ['xvfb-run', '-a'] 108 cmd = ['xvfb-run', '-a']
109 else: 109 else:
110 cmd = [] 110 cmd = []
111 111
112 user_test = os.environ.get('USER_TEST', 'no') 112 user_test = os.environ.get('USER_TEST', 'no')
(...skipping 10 matching lines...) Expand all
123 123
124 # TODO(ricow/kustermann): Issue 7339 124 # TODO(ricow/kustermann): Issue 7339
125 if runtime == "safari": 125 if runtime == "safari":
126 cmd.append('--nobatch') 126 cmd.append('--nobatch')
127 127
128 if user_test == 'yes': 128 if user_test == 'yes':
129 cmd.append('--progress=color') 129 cmd.append('--progress=color')
130 else: 130 else:
131 cmd.extend(['--progress=buildbot', '-v']) 131 cmd.extend(['--progress=buildbot', '-v'])
132 132
133 global IsFirstTestStepCall
134 if IsFirstTestStepCall:
135 IsFirstTestStepCall = False
136 else:
137 cmd.append('--append_flaky_log')
138
133 if flags: 139 if flags:
134 cmd.extend(flags) 140 cmd.extend(flags)
135 cmd.extend(targets) 141 cmd.extend(targets)
136 142
137 print 'running %s' % (' '.join(cmd)) 143 print 'running %s' % (' '.join(cmd))
138 bot.RunProcess(cmd) 144 bot.RunProcess(cmd)
139 145
140 146
141 def TestCompiler(runtime, mode, system, flags, is_buildbot, test_set): 147 def TestCompiler(runtime, mode, system, flags, is_buildbot, test_set):
142 """ test the compiler. 148 """ test the compiler.
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 """ 313 """
308 with bot.BuildStep('Build SDK and d8'): 314 with bot.BuildStep('Build SDK and d8'):
309 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, 315 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode,
310 'dart2js_bot'] 316 'dart2js_bot']
311 print 'Build SDK and d8: %s' % (' '.join(args)) 317 print 'Build SDK and d8: %s' % (' '.join(args))
312 bot.RunProcess(args) 318 bot.RunProcess(args)
313 319
314 320
315 if __name__ == '__main__': 321 if __name__ == '__main__':
316 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler) 322 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698