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

Unified Diff: scripts/slave/kitchen_run.py

Issue 2018393002: kitchen_run: use infra/recipes-py instead of kitchen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/kitchen_run.py
diff --git a/scripts/slave/kitchen_run.py b/scripts/slave/kitchen_run.py
index cd909b753b7b20100cf67a85c04f0ddba7c3fc1f..c2e41f2b16e382064dba603f52914d2ba2c11ff7 100644
--- a/scripts/slave/kitchen_run.py
+++ b/scripts/slave/kitchen_run.py
@@ -64,14 +64,12 @@ def _call(cmd, **kwargs):
return exit_code
-def _install_cipd_packages(path, *binaries):
- """Bootstraps CIPD in |path| and installs requested |binaries|.
+def _install_cipd_packages(path, *packages):
+ """Bootstraps CIPD in |path| and installs requested |packages|.
Args:
path (str): The CIPD installation root.
- binaries (list of CipdBinary): The set of CIPD binaries to install.
-
- Returns (list): The paths to the binaries.
+ packages (list of CipdPackage): The set of CIPD packages to install.
"""
cmd = [
sys.executable,
@@ -79,13 +77,12 @@ def _install_cipd_packages(path, *binaries):
'--dest-directory', path,
'-vv' if logging.getLogger().level == logging.DEBUG else '-v',
]
- for b in binaries:
- cmd += ['-P', '%s@%s' % (b.package.name, b.package.version)]
+ for p in packages:
+ cmd += ['-P', '%s@%s' % (p.name, p.version)]
exit_code = _call(cmd)
if exit_code != 0:
raise Exception('Failed to install CIPD packages.')
- return [os.path.join(path, b.relpath) for b in binaries]
def main(argv):
@@ -109,8 +106,8 @@ def main(argv):
basedir = os.getcwd()
cipd_path = os.path.join(basedir, '.kitchen_cipd')
- (kitchen,) = _install_cipd_packages(
- cipd_path, CIPD_BINARIES[infra_platform.get()])
+ _install_cipd_packages(
+ cipd_path, cipd.CipdPackage('infra/recipes-py', 'latest'))
with robust_tempdir.RobustTempdir(
prefix='.kitchen_run', leak=args.leak) as rt:
@@ -135,12 +132,16 @@ def main(argv):
monitoring_utils.write_build_monitoring_event(build_data_dir, properties)
return _call([
- kitchen, 'cook',
- '-repository', args.repository,
- '-revision', args.revision,
- '-recipe', args.recipe,
- '-properties-file', properties_file,
- '-workdir', tempdir,
+ sys.executable,
+ os.path.join(cipd_path, 'recipes.py'),
+ 'remote_run',
+ '--repository', args.repository,
+ '--revision', args.revision,
+ '--workdir', os.path.join(tempdir, 'remote_run_workdir'),
+ '--',
+ '--properties-file', properties_file,
+ '--workdir', os.path.join(tempdir, 'run_workdir'),
+ args.recipe,
])
« 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