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

Side by Side Diff: scripts/master/recipe_converter.py

Issue 2143503002: Switch chromedriver to new recipe, remove bb_run_bot references from build/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 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 | Annotate | Revision Log
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import master.chromium_step 5 import master.chromium_step
6 import master.log_parser.retcode_command 6 import master.log_parser.retcode_command
7 import master.log_parser.webkit_test_command 7 import master.log_parser.webkit_test_command
8 import master.factory.commands 8 import master.factory.commands
9 import master.factory.drmemory_factory 9 import master.factory.drmemory_factory
10 import master.master_utils 10 import master.master_utils
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 'win_gclient_safe_revert': (buildbot.steps.shell.ShellCommand, 205 'win_gclient_safe_revert': (buildbot.steps.shell.ShellCommand,
206 { 206 {
207 'command': ['python_slave', 207 'command': ['python_slave',
208 '..\\..\\..\\scripts\\slave\\gclient_safe_revert.py', 208 '..\\..\\..\\scripts\\slave\\gclient_safe_revert.py',
209 '.', 'gclient.bat'], 209 '.', 'gclient.bat'],
210 'description': 'gclient_revert', 210 'description': 'gclient_revert',
211 'name': 'gclient_revert', 211 'name': 'gclient_revert',
212 'workdir': 'build', 212 'workdir': 'build',
213 } 213 }
214 ), 214 ),
215 'bb_run_bot': (master.chromium_step.AnnotatedCommand,
216 {
217 'command': ['python',
218 'src/build/android/buildbot/bb_run_bot.py'],
219 'name': 'slave_steps',
220 'description': 'slave_steps',
221 }
222 ),
223 'gclient_runhooks_wrapper': (buildbot.steps.shell.ShellCommand, 215 'gclient_runhooks_wrapper': (buildbot.steps.shell.ShellCommand,
224 { 216 {
225 'command': ['python', '../../../scripts/slave/runhooks_wrapper.py'], 217 'command': ['python', '../../../scripts/slave/runhooks_wrapper.py'],
226 'description': 'gclient hooks', 218 'description': 'gclient hooks',
227 'env': {}, 219 'env': {},
228 'name': 'runhooks' 220 'name': 'runhooks'
229 # NOTE: locking shouldn't be required, as only one recipe is ever run on 221 # NOTE: locking shouldn't be required, as only one recipe is ever run on
230 # a slave at a time; specifically, a SlaveLock of type slave_exclusive 222 # a slave at a time; specifically, a SlaveLock of type slave_exclusive
231 # *should be* redundant. Noted here in case it isn't. (aneeshm) 223 # *should be* redundant. Noted here in case it isn't. (aneeshm)
232 } 224 }
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 rc.steps.append('api.gclient.c = src_cfg') 1608 rc.steps.append('api.gclient.c = src_cfg')
1617 # Then, call bot_update on it. 1609 # Then, call bot_update on it.
1618 rc.steps.append('result = api.bot_update.ensure_checkout(force=True)') 1610 rc.steps.append('result = api.bot_update.ensure_checkout(force=True)')
1619 rc.steps.append( 1611 rc.steps.append(
1620 'build_properties.update(result.json.output.get("properties", {}))') 1612 'build_properties.update(result.json.output.get("properties", {}))')
1621 # NOTE: wherever there is a gclient_runhooks steps after bot_update (which 1613 # NOTE: wherever there is a gclient_runhooks steps after bot_update (which
1622 # *should* be everywhere), the '--gyp_env' argument need not be passed in; 1614 # *should* be everywhere), the '--gyp_env' argument need not be passed in;
1623 # that is why it is ignored here. (aneeshm) 1615 # that is why it is ignored here. (aneeshm)
1624 return rc 1616 return rc
1625 1617
1626 def bb_run_bot_converter(step):
1627 rc = recipe_chunk()
1628 rc.steps.append('# slave_steps step')
1629 rc.deps.add('recipe_engine/python')
1630 rc.deps.add('recipe_engine/json')
1631 build_properties = "'--build-properties=%s' % " +\
1632 "api.json.dumps(build_properties, separators=(',', ':'))"
1633 fmtstr = 'api.python("slave_steps", "%s", args=[%s, \'%s\'],' +\
1634 ' allow_subannotations=True)'
1635 rc.steps.append(fmtstr % (step[1]['command'][1], build_properties,
1636 step[1]['command'][3]))
1637 return rc
1638
1639 def gclient_runhooks_wrapper_converter(step): 1618 def gclient_runhooks_wrapper_converter(step):
1640 rc = recipe_chunk() 1619 rc = recipe_chunk()
1641 rc.deps.add('recipe_engine/python') 1620 rc.deps.add('recipe_engine/python')
1642 rc.deps.add('recipe_engine/path') 1621 rc.deps.add('recipe_engine/path')
1643 rc.steps.append('# gclient runhooks wrapper step') 1622 rc.steps.append('# gclient runhooks wrapper step')
1644 rc.steps.append('env = %s' % repr(step[1]['env'])) 1623 rc.steps.append('env = %s' % repr(step[1]['env']))
1645 rc.steps.append('api.python("gclient runhooks wrapper", ' +\ 1624 rc.steps.append('api.python("gclient runhooks wrapper", ' +\
1646 'api.path["build"].join("scripts", "slave", "runhooks_wrapper.py"), '+\ 1625 'api.path["build"].join("scripts", "slave", "runhooks_wrapper.py"), '+\
1647 'env=env)') 1626 'env=env)')
1648 return rc 1627 return rc
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 1696
1718 _step_converters_map = { 1697 _step_converters_map = {
1719 'cleanup_temp': cleanup_temp_converter, 1698 'cleanup_temp': cleanup_temp_converter,
1720 'win_cleanup_temp': cleanup_temp_converter, 1699 'win_cleanup_temp': cleanup_temp_converter,
1721 'update_scripts': update_scripts_converter, 1700 'update_scripts': update_scripts_converter,
1722 'gclient_safe_revert': gclient_safe_revert_converter, 1701 'gclient_safe_revert': gclient_safe_revert_converter,
1723 'win_gclient_safe_revert': gclient_safe_revert_converter, 1702 'win_gclient_safe_revert': gclient_safe_revert_converter,
1724 'gclient_update': gclient_update_converter, 1703 'gclient_update': gclient_update_converter,
1725 'bot_update': bot_update_converter, 1704 'bot_update': bot_update_converter,
1726 'win_bot_update': bot_update_converter, 1705 'win_bot_update': bot_update_converter,
1727 'bb_run_bot': bb_run_bot_converter,
1728 'gclient_runhooks_wrapper': gclient_runhooks_wrapper_converter, 1706 'gclient_runhooks_wrapper': gclient_runhooks_wrapper_converter,
1729 'win_gclient_runhooks_wrapper': gclient_runhooks_wrapper_converter, 1707 'win_gclient_runhooks_wrapper': gclient_runhooks_wrapper_converter,
1730 'chromedriver_buildbot_run': chromedriver_buildbot_run_converter, 1708 'chromedriver_buildbot_run': chromedriver_buildbot_run_converter,
1731 'win_chromedriver_buildbot_run': win_chromedriver_buildbot_run_converter, 1709 'win_chromedriver_buildbot_run': win_chromedriver_buildbot_run_converter,
1732 'compile_py': compile_py_converter, 1710 'compile_py': compile_py_converter,
1733 'win_compile_py': win_compile_py_converter, 1711 'win_compile_py': win_compile_py_converter,
1734 'win_svnkill': win_svnkill_converter, 1712 'win_svnkill': win_svnkill_converter,
1735 'win_update_scripts': update_scripts_converter, 1713 'win_update_scripts': update_scripts_converter,
1736 'win_taskkill': win_taskkill_converter, 1714 'win_taskkill': win_taskkill_converter,
1737 'runtest': runtest_converter, 1715 'runtest': runtest_converter,
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2152 print >> f, ">>> Converted" 2130 print >> f, ">>> Converted"
2153 print >> f, step_to_recipe_chunk(step) 2131 print >> f, step_to_recipe_chunk(step)
2154 2132
2155 def write_numsteps_builder(c, buildername, filename): 2133 def write_numsteps_builder(c, buildername, filename):
2156 with open(filename, 'w') as f: 2134 with open(filename, 'w') as f:
2157 f.write(str(len(extract_builder_steplist(c, buildername)))) 2135 f.write(str(len(extract_builder_steplist(c, buildername))))
2158 2136
2159 def write_builder_steplist(c, builder_name, filename): 2137 def write_builder_steplist(c, builder_name, filename):
2160 with open(filename, 'w') as f: 2138 with open(filename, 'w') as f:
2161 f.write(pprint.pformat(extract_builder_steplist(c, builder_name), indent=2)) 2139 f.write(pprint.pformat(extract_builder_steplist(c, builder_name), indent=2))
OLDNEW
« no previous file with comments | « masters/master.chromium.fyi/master.cfg ('k') | scripts/slave/recipes/chromium.fyi.misc_block.recipe_autogen.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698