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

Side by Side Diff: build/android/buildbot/bb_run_bot.py

Issue 12879017: Upload Android test data to flakiness dashboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | 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/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import collections 7 import collections
8 import copy
8 import json 9 import json
9 import optparse 10 import optparse
10 import os 11 import os
11 import pipes 12 import pipes
12 import subprocess 13 import subprocess
13 import sys 14 import sys
14 15
15 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) 16 sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
16 from pylib import buildbot_report 17 from pylib import buildbot_report
17 18
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 WrapWithBash(' '.join(map(pipes.quote, run_test_cmd))), run_test_cmd)) 75 WrapWithBash(' '.join(map(pipes.quote, run_test_cmd))), run_test_cmd))
75 76
76 return commands 77 return commands
77 78
78 79
79 def GetBotStepMap(): 80 def GetBotStepMap():
80 compile_step = ['bb_compile'] 81 compile_step = ['bb_compile']
81 std_build_steps = ['bb_compile', 'bb_zip_build'] 82 std_build_steps = ['bb_compile', 'bb_zip_build']
82 std_test_steps = ['bb_extract_build'] 83 std_test_steps = ['bb_extract_build']
83 std_tests = ['ui', 'unit'] 84 std_tests = ['ui', 'unit']
85 flakiness_server = '--upload-to-flakiness-server'
84 86
85 B = BotConfig 87 B = BotConfig
86 def T(tests, extra_args=None): 88 def T(tests, extra_args=None):
87 return TestConfig(tests, extra_args) 89 return TestConfig(tests, extra_args)
88 90
89 bot_configs = [ 91 bot_configs = [
90 # Main builders 92 # Main builders
91 B('main-builder-dbg', 93 B('main-builder-dbg',
92 ['bb_check_webview_licenses', 'bb_compile', 'bb_run_findbugs', 94 ['bb_check_webview_licenses', 'bb_compile', 'bb_run_findbugs',
93 'bb_zip_build'], None, None), 95 'bb_zip_build'], None, None),
94 B('main-builder-rel', 96 B('main-builder-rel',
95 ['bb_compile', 'bb_zip_build'], None, None), 97 ['bb_compile', 'bb_zip_build'], None, None),
96 B('main-clang-builder', compile_step, None, None), 98 B('main-clang-builder', compile_step, None, None),
97 B('main-clobber', compile_step, None, None), 99 B('main-clobber', compile_step, None, None),
98 B('main-tests', std_test_steps, T(std_tests), None), 100 B('main-tests', std_test_steps, T(std_tests, [flakiness_server]),
101 None),
99 102
100 # Other waterfalls 103 # Other waterfalls
101 B('asan-builder', std_build_steps, None, None), 104 B('asan-builder', std_build_steps, None, None),
102 B('asan-tests', std_test_steps + ['bb_asan_tests_setup'], 105 B('asan-tests', std_test_steps + ['bb_asan_tests_setup'],
103 T(std_tests, ['--asan']), None), 106 T(std_tests, ['--asan']), None),
104 B('chromedriver-fyi-tests-dbg', std_test_steps, T(['chromedriver']), 107 B('chromedriver-fyi-tests-dbg', std_test_steps, T(['chromedriver']),
105 None), 108 None),
106 B('fyi-builder-dbg', 109 B('fyi-builder-dbg',
107 ['bb_check_webview_licenses', 'bb_compile', 'bb_compile_experimental', 110 ['bb_check_webview_licenses', 'bb_compile', 'bb_compile_experimental',
108 'bb_run_findbugs', 'bb_zip_build'], None, None), 111 'bb_run_findbugs', 'bb_zip_build'], None, None),
109 B('fyi-builder-rel', 112 B('fyi-builder-rel',
110 ['bb_compile', 'bb_compile_experimental', 'bb_zip_build'], None, None), 113 ['bb_compile', 'bb_compile_experimental', 'bb_zip_build'], None, None),
111 B('fyi-tests', std_test_steps, 114 B('fyi-tests', std_test_steps,
112 T(std_tests, ['--experimental', '--upload-to-flakiness-server']), None), 115 T(std_tests, ['--experimental', flakiness_server]), None),
113 B('perf-tests-rel', std_test_steps, T([], ['--install=ContentShell']), 116 B('perf-tests-rel', std_test_steps, T([], ['--install=ContentShell']),
114 None), 117 None),
115 B('try-fyi-tests', std_test_steps, T(std_tests, ['--experimental']),
116 None),
117 B('webkit-latest-webkit-tests', std_test_steps, 118 B('webkit-latest-webkit-tests', std_test_steps,
118 T(['webkit_layout', 'webkit']), None), 119 T(['webkit_layout', 'webkit']), None),
119 B('webkit-latest-contentshell', compile_step, T(['webkit_layout']), None), 120 B('webkit-latest-contentshell', compile_step, T(['webkit_layout']), None),
120 121
121 # Generic builder config (for substring match). 122 # Generic builder config (for substring match).
122 B('builder', std_build_steps, None, None), 123 B('builder', std_build_steps, None, None),
123 ] 124 ]
124 125
125 bot_map = dict((config.bot_id, config) for config in bot_configs) 126 bot_map = dict((config.bot_id, config) for config in bot_configs)
126 127
127 # These bots have identical configuration to ones defined earlier. 128 # These bots have identical configuration to ones defined earlier.
128 copy_map = [ 129 copy_map = [
129 ('try-builder-dbg', 'main-builder-dbg'), 130 ('try-builder-dbg', 'main-builder-dbg'),
130 ('try-builder-rel', 'main-builder-rel'), 131 ('try-builder-rel', 'main-builder-rel'),
131 ('try-clang-builder', 'main-clang-builder'), 132 ('try-clang-builder', 'main-clang-builder'),
132 ('try-fyi-builder-dbg', 'fyi-builder-dbg'), 133 ('try-fyi-builder-dbg', 'fyi-builder-dbg'),
133 ('try-tests', 'main-tests'), 134 ('try-tests', 'main-tests'),
135 ('try-fyi-tests', 'fyi-tests'),
134 ('webkit-latest-tests', 'main-tests'), 136 ('webkit-latest-tests', 'main-tests'),
135 ] 137 ]
136 for to_id, from_id in copy_map: 138 for to_id, from_id in copy_map:
137 assert to_id not in bot_map 139 assert to_id not in bot_map
138 # pylint: disable=W0212 140 # pylint: disable=W0212
139 bot_map[to_id] = bot_map[from_id]._replace(bot_id=to_id) 141 bot_map[to_id] = copy.deepcopy(bot_map[from_id])._replace(bot_id=to_id)
140 142
143 # Trybots do not upload to flakiness dashboard. They should be otherwise
144 # identical in configuration to their trunk building counterparts.
145 test_obj = bot_map[to_id].test_obj
146 if to_id.startswith('try') and test_obj:
147 extra_args = test_obj.extra_args
148 if extra_args and flakiness_server in extra_args:
149 extra_args.remove(flakiness_server)
frankf 2013/03/20 18:39:40 I don't think all this logic is justified for remo
Isaac (away) 2013/03/20 18:42:56 I'm not sure what you mean. I'm open to other sug
frankf 2013/03/20 19:01:32 This is outside of the scope of this CL, but I thi
141 return bot_map 150 return bot_map
142 151
143 152
144 def main(argv): 153 def main(argv):
145 parser = optparse.OptionParser() 154 parser = optparse.OptionParser()
146 155
147 def ConvertJson(option, _, value, parser): 156 def ConvertJson(option, _, value, parser):
148 setattr(parser.values, option.dest, json.loads(value)) 157 setattr(parser.values, option.dest, json.loads(value))
149 158
150 parser.add_option('--build-properties', action='callback', 159 parser.add_option('--build-properties', action='callback',
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 cwd=CHROME_SRC, 214 cwd=CHROME_SRC,
206 env=dict(os.environ, BUILDBOT_TESTING='1')) 215 env=dict(os.environ, BUILDBOT_TESTING='1'))
207 else: 216 else:
208 return_code = subprocess.call(command, cwd=CHROME_SRC, env=env) 217 return_code = subprocess.call(command, cwd=CHROME_SRC, env=env)
209 if return_code != 0: 218 if return_code != 0:
210 return return_code 219 return return_code
211 220
212 221
213 if __name__ == '__main__': 222 if __name__ == '__main__':
214 sys.exit(main(sys.argv)) 223 sys.exit(main(sys.argv))
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