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

Side by Side Diff: dart/tools/build.py

Issue 13945021: Merge revision 21306 to trunk. This fixes an issue with xcode output parsing on 10.6 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/tools/VERSION ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 import optparse 8 import optparse
9 import os 9 import os
10 import shutil 10 import shutil
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 term = os.getenv('TERM', 'dumb') 266 term = os.getenv('TERM', 'dumb')
267 # The capability "clr_eol" means clear the line from cursor to end 267 # The capability "clr_eol" means clear the line from cursor to end
268 # of line. See man pages for tput and terminfo. 268 # of line. See man pages for tput and terminfo.
269 try: 269 try:
270 clr_eol = subprocess.check_output(['tput', '-T' + term, 'el'], 270 clr_eol = subprocess.check_output(['tput', '-T' + term, 'el'],
271 stderr=subprocess.STDOUT) 271 stderr=subprocess.STDOUT)
272 if clr_eol: 272 if clr_eol:
273 is_fancy_tty = True 273 is_fancy_tty = True
274 except subprocess.CalledProcessError: 274 except subprocess.CalledProcessError:
275 is_fancy_tty = False 275 is_fancy_tty = False
276 except AttributeError:
277 is_fancy_tty = False
276 for line in unbuffered(process.stdout.readline): 278 for line in unbuffered(process.stdout.readline):
277 line = line.rstrip() 279 line = line.rstrip()
278 if line.startswith('=== BUILD ') or line.startswith('** BUILD '): 280 if line.startswith('=== BUILD ') or line.startswith('** BUILD '):
279 if not is_empty_chunk(chunk): 281 if not is_empty_chunk(chunk):
280 print '\n'.join(chunk) 282 print '\n'.join(chunk)
281 section = line 283 section = line
282 if is_fancy_tty: 284 if is_fancy_tty:
283 # If stdout is a terminal, emit "progress" information. The 285 # If stdout is a terminal, emit "progress" information. The
284 # progress information is the first line of the current chunk. 286 # progress information is the first line of the current chunk.
285 # After printing the line, move the cursor back to the 287 # After printing the line, move the cursor back to the
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 process.wait() 408 process.wait()
407 if process.returncode != 0: 409 if process.returncode != 0:
408 print "BUILD FAILED" 410 print "BUILD FAILED"
409 return 1 411 return 1
410 412
411 return 0 413 return 0
412 414
413 415
414 if __name__ == '__main__': 416 if __name__ == '__main__':
415 sys.exit(Main()) 417 sys.exit(Main())
OLDNEW
« no previous file with comments | « dart/tools/VERSION ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698