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

Unified Diff: chrome/build_nacl_irt.py

Issue 7701017: Switching NaCl IRT to be built inside the chrome build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « build/download_nacl_irt.py ('k') | chrome/nacl.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « build/download_nacl_irt.py ('k') | chrome/nacl.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698