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

Side by Side Diff: tools/testing/frogpad/frogpad.py

Issue 9666023: fix logging.info (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | « no previous file | 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 """ 8 """
9 Frogpad is used to compile .dart files to javascript. 9 Frogpad is used to compile .dart files to javascript.
10 10
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 command = format_command(args) 342 command = format_command(args)
343 logging.debug("RUNNING " + command) 343 logging.debug("RUNNING " + command)
344 child = subprocess.Popen(args, 344 child = subprocess.Popen(args,
345 stdout=subprocess.PIPE, 345 stdout=subprocess.PIPE,
346 stderr=subprocess.PIPE, 346 stderr=subprocess.PIPE,
347 close_fds=True) 347 close_fds=True)
348 (stdout, stderr) = child.communicate() 348 (stdout, stderr) = child.communicate()
349 exit_code = child.wait() 349 exit_code = child.wait()
350 if exit_code: 350 if exit_code:
351 for line in stderr.splitlines(): 351 for line in stderr.splitlines():
352 logging.info(logging.INFO, line) 352 logging.info(line)
353 msg = "FAILURE (exit_code=%d): '%s'" % (exit_code, command) 353 msg = "FAILURE (exit_code=%d): '%s'" % (exit_code, command)
354 logging.error(msg) 354 logging.error(msg)
355 raise CommandFailedException(msg) 355 raise CommandFailedException(msg)
356 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) 356 logging.debug("SUCCEEDED (%d bytes)" % len(stdout))
357 return stdout 357 return stdout
358 358
359 359
360 def main(argv): 360 def main(argv):
361 Pad(argv) 361 Pad(argv)
362 362
363 if __name__ == "__main__": 363 if __name__ == "__main__":
364 sys.exit(main(sys.argv)) 364 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698