Commit e0419262 authored by binji@chromium.org's avatar binji@chromium.org

[NaCl SDK] Use subst to keep path lengths short on the buildbots.

BUG=245453
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/15979033

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204020 0039d316-1c4b-4281-b951-d872f2087c98
parent ba218f9f
......@@ -56,12 +56,7 @@ CYGTAR = os.path.join(NACL_DIR, 'build', 'cygtar.py')
NACLPORTS_URL = 'https://naclports.googlecode.com/svn/trunk/src'
NACLPORTS_REV = 774
# TODO(binji): horrible hack to make the Windows builders go green...
# Windows has a path length limit of 255 characters, after joining cwd with a
# relative path. Some of the Windows builders are over by just a little bit, so
# we'll temporarily use a shorter build directory name to make it all work.
# See http://crbug.com/245453
GYPBUILD_DIR = 'gb' # Was 'gypbuild'
GYPBUILD_DIR = 'gypbuild'
options = None
......
......@@ -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():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment