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

Unified Diff: scripts/slave/remote_run.py

Issue 2061213002: remote_run: use /b as base directory for temporary files when available (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
« scripts/common/chromium_utils.py ('K') | « scripts/common/chromium_utils.py ('k') | 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 be1abdf27afaf8851491c3790850f4db2c4d41a9..36e2d9430cc0c36bc7635abf7cd26e67c81024a0 100644
--- a/scripts/slave/remote_run.py
+++ b/scripts/slave/remote_run.py
@@ -88,11 +88,15 @@ def main(argv):
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()
+ prefix='rr', leak=args.leak) as rt:
+ try:
+ basedir = chromium_utils.FindUpward(os.getcwd(), 'b')
+ except chromium_utils.PathNotFound as e:
+ LOGGER.warn(e)
+ # 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.
@@ -120,10 +124,10 @@ def main(argv):
'remote_run',
'--repository', args.repository,
'--revision', args.revision,
- '--workdir', os.path.join(tempdir, 'remote_run_workdir'),
+ '--workdir', os.path.join(tempdir, 'rw'),
'--',
'--properties-file', properties_file,
- '--workdir', os.path.join(tempdir, 'work'),
+ '--workdir', os.path.join(tempdir, 'w'),
args.recipe,
]
recipe_return_code = None
« scripts/common/chromium_utils.py ('K') | « scripts/common/chromium_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698