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

Unified Diff: scripts/slave/remote_run.py

Issue 2049053002: remote_run: use tempfile.gettempdir() for workdirs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 6 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/remote_run.py
diff --git a/scripts/slave/remote_run.py b/scripts/slave/remote_run.py
index 923360dd318657c143d01949402cf8a2658654b4..c69dbcbfd280664dc86a00653eeb4275541d7f22 100644
--- a/scripts/slave/remote_run.py
+++ b/scripts/slave/remote_run.py
@@ -82,13 +82,18 @@ def main(argv):
args = parser.parse_args(argv[1:])
- basedir = os.getcwd()
- cipd_path = os.path.join(basedir, '.remote_run_cipd')
+ # Keep CIPD directory between builds.
+ cipd_path = os.path.join(os.getcwd(), '.remote_run_cipd')
_install_cipd_packages(
cipd_path, cipd.CipdPackage('infra/recipes-py', 'latest'))
with robust_tempdir.RobustTempdir(
prefix='.remote_run', leak=args.leak) as rt:
+ # Use base directory inside system temporary directory - if we use slave
+ # one (cwd), the paths get too long. Recipes which need different paths
+ # or persistent directories should do so explicitly.
+ basedir = tempfile.gettempdir()
+
# Explicitly clean up possibly leaked temporary directories
# from previous runs.
rt.cleanup(basedir)
@@ -118,7 +123,7 @@ def main(argv):
'--workdir', os.path.join(tempdir, 'remote_run_workdir'),
'--',
'--properties-file', properties_file,
- '--workdir', os.path.join(tempdir, 'run_workdir'),
+ '--workdir', os.path.join(tempdir, 'work'),
args.recipe,
]
recipe_return_code = None
« 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