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

Unified Diff: native_client_sdk/src/build_tools/buildbot_run.py

Issue 15979033: [NaCl SDK] Use subst to keep path lengths short on the buildbots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 | « native_client_sdk/src/build_tools/build_sdk.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/buildbot_run.py
diff --git a/native_client_sdk/src/build_tools/buildbot_run.py b/native_client_sdk/src/build_tools/buildbot_run.py
index f5e4ba585dcf659a4db25364e505addc8b14770f..c74308e7247f39aabf94f3bc430a56f7a243e5aa 100755
--- a/native_client_sdk/src/build_tools/buildbot_run.py
+++ b/native_client_sdk/src/build_tools/buildbot_run.py
@@ -14,9 +14,12 @@ run.
import buildbot_common
import os
+import subprocess
import sys
+
from buildbot_common import Run
-from build_paths import SDK_SRC_DIR, SCRIPT_DIR
+from build_paths import SRC_DIR, SDK_SRC_DIR, SCRIPT_DIR
+import getos
def StepRunUnittests():
@@ -33,7 +36,25 @@ def StepRunUnittests():
def StepBuildSDK(args):
- Run([sys.executable, 'build_sdk.py'] + args, cwd=SCRIPT_DIR)
+ is_win = getos.GetPlatform() == 'win'
+
+ # Windows has a path length limit of 255 characters, after joining cwd with a
+ # relative path. Use subst before building to keep the path lengths short.
+ if is_win:
+ subst_drive = 'S:'
+ root_dir = os.path.dirname(SRC_DIR)
+ new_root_dir = subst_drive + '\\'
+ subprocess.check_call(['subst', subst_drive, root_dir])
+ new_script_dir = os.path.join(new_root_dir,
+ os.path.relpath(SCRIPT_DIR, root_dir))
+ else:
+ new_script_dir = SCRIPT_DIR
+
+ try:
+ Run([sys.executable, 'build_sdk.py'] + args, cwd=new_script_dir)
+ finally:
+ if is_win:
+ subprocess.check_call(['subst', '/D', subst_drive])
def StepTestSDK():
« no previous file with comments | « native_client_sdk/src/build_tools/build_sdk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698