Index: chrome/build_nacl_irt.py |
=================================================================== |
--- chrome/build_nacl_irt.py (revision 97950) |
+++ chrome/build_nacl_irt.py (working copy) |
@@ -60,6 +60,23 @@ |
stdout=subprocess.PIPE, |
stderr=subprocess.PIPE) |
(p_stdout, p_stderr) = p.communicate() |
+ # If things fail on windows, try running --help, if that fails, |
+ # emit this script as an input (to satiate gyp), and assume we're being |
+ # run on a test only bot. |
+ # TODO(bradnelson): add plumbing to the buildbots to allow this script |
+ # to know its on a test only bot + make scons return a _particular_ |
+ # return code so we can detect this kind of fail in one step. |
+ if p.returncode != 0 and sys.platform == 'win32': |
+ cmd = [sys.executable, 'scons.py', '--help'] |
+ p = subprocess.Popen(cmd, cwd=NACL_DIR, |
+ stdout=subprocess.PIPE, |
+ stderr=subprocess.PIPE) |
+ (p_stdout, p_stderr) = p.communicate() |
+ if p.returncode !=0: |
+ # If scons can't even run, emit just this script as an input. |
+ # See comment above this one. |
+ print RelativePath(__file__, SCRIPT_DIR).replace(os.sep, '/') |
+ return |
if p.returncode != 0: |
sys.exit(2) |
# Extract unique inputs. |
@@ -89,7 +106,7 @@ |
# (i.e. the file is outside the client). |
if RelativePath(nf, SRC_DIR).startswith('..' + os.sep): |
continue |
- rel_inputs.add(RelativePath(nf, SCRIPT_DIR)) |
+ rel_inputs.add(RelativePath(nf, SCRIPT_DIR).replace(os.sep, '/')) |
# Print it sorted. |
rel_inputs = sorted(list(rel_inputs)) |
for f in rel_inputs: |