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

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

Issue 9653018: fix log level (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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 """ 338 """
339 339
340 command = format_command(args) 340 command = format_command(args)
341 logging.debug("RUNNING " + command) 341 logging.debug("RUNNING " + command)
342 child = subprocess.Popen(args, 342 child = subprocess.Popen(args,
343 stdout=subprocess.PIPE, 343 stdout=subprocess.PIPE,
344 stderr=subprocess.PIPE, 344 stderr=subprocess.PIPE,
345 close_fds=True) 345 close_fds=True)
346 (stdout, stderr) = child.communicate() 346 (stdout, stderr) = child.communicate()
347 for line in stderr.splitlines(): 347 for line in stderr.splitlines():
348 logging.info(log_level, '%s: %s', args[0], line) 348 logging.info(logging.INFO, '%s: %s', args[0], line)
349 exitcode = child.wait() 349 exitcode = child.wait()
350 if exitcode: 350 if exitcode:
351 msg = "FAILURE (exit_code=%d): '%s'" % (exit_code, command) 351 msg = "FAILURE (exit_code=%d): '%s'" % (exit_code, command)
352 logging.error(msg) 352 logging.error(msg)
353 raise CommandFailedException(msg) 353 raise CommandFailedException(msg)
354 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) 354 logging.debug("SUCCEEDED (%d bytes)" % len(stdout))
355 return stdout 355 return stdout
356 356
357 357
358 def main(argv): 358 def main(argv):
359 Pad(argv) 359 Pad(argv)
360 360
361 if __name__ == "__main__": 361 if __name__ == "__main__":
362 sys.exit(main(sys.argv)) 362 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