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

Unified Diff: scripts/slave/annotated_run.py

Issue 2062293002: annotated_run: Use builder directory for temp. (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 | scripts/slave/unittests/annotated_run_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/annotated_run.py
diff --git a/scripts/slave/annotated_run.py b/scripts/slave/annotated_run.py
index db8271dcef9783e40f4b0493fa7d3a2a969894b7..7323581063959eaf322757f21bf6e755311dc06e 100755
--- a/scripts/slave/annotated_run.py
+++ b/scripts/slave/annotated_run.py
@@ -28,6 +28,17 @@ from slave import update_scripts
# Logging instance.
LOGGER = logging.getLogger('annotated_run')
+# /b/build/slave/<slavename>/build/
+BUILD_DIR = os.getcwd()
+# /b/build/slave/<slavename>/
+BUILDER_DIR = os.path.dirname(BUILD_DIR)
+
+def _build_dir():
+ return BUILD_DIR
+
+def _builder_dir():
+ return BUILDER_DIR
+
def _ensure_directory(*path):
path = os.path.join(*path)
if not os.path.isdir(path):
@@ -252,7 +263,7 @@ def _exec_recipe(rt, opts, basedir, tdir, properties):
sys.executable, '-u', recipe_runner,
'--verbose',
'run',
- '--workdir=%s' % os.getcwd(),
+ '--workdir=%s' % _build_dir(),
'--properties-file=%s' % props_file,
properties['recipe'],
]
@@ -290,7 +301,7 @@ def main(argv):
clean_old_recipe_engine()
# Enter our runtime environment.
- basedir = os.getcwd()
+ basedir = _builder_dir()
with robust_tempdir.RobustTempdir(
prefix='.recipe_runtime', leak=opts.leak) as rt:
tdir = rt.tempdir(base=basedir)
« no previous file with comments | « no previous file | scripts/slave/unittests/annotated_run_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698