OLD | NEW |
1 # Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2010, 2012 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 for extension in ('.txt', '.png', '.wav'): | 407 for extension in ('.txt', '.png', '.wav'): |
408 self._print_baseline(test_name, extension) | 408 self._print_baseline(test_name, extension) |
409 | 409 |
410 self._print_default(' exp: %s' % exp_str) | 410 self._print_default(' exp: %s' % exp_str) |
411 self._print_default(' got: %s' % got_str) | 411 self._print_default(' got: %s' % got_str) |
412 self._print_default(' took: %-.3f' % result.test_run_time) | 412 self._print_default(' took: %-.3f' % result.test_run_time) |
413 self._print_default('') | 413 self._print_default('') |
414 | 414 |
415 def _print_baseline(self, test_name, extension): | 415 def _print_baseline(self, test_name, extension): |
416 baseline = self._port.expected_filename(test_name, extension) | 416 baseline = self._port.expected_filename(test_name, extension) |
417 if self._port._filesystem.exists(baseline): | 417 if self._port.host.filesystem.exists(baseline): |
418 relpath = self._port.relative_test_filename(baseline) | 418 relpath = self._port.relative_test_filename(baseline) |
419 else: | 419 else: |
420 relpath = '<none>' | 420 relpath = '<none>' |
421 self._print_default(' %s: %s' % (extension[1:], relpath)) | 421 self._print_default(' %s: %s' % (extension[1:], relpath)) |
422 | 422 |
423 def _print_quiet(self, msg): | 423 def _print_quiet(self, msg): |
424 self.writeln(msg) | 424 self.writeln(msg) |
425 | 425 |
426 def _print_default(self, msg): | 426 def _print_default(self, msg): |
427 if not self._options.quiet: | 427 if not self._options.quiet: |
428 self.writeln(msg) | 428 self.writeln(msg) |
429 | 429 |
430 def _print_debug(self, msg): | 430 def _print_debug(self, msg): |
431 if self._options.debug_rwt_logging: | 431 if self._options.debug_rwt_logging: |
432 self.writeln(msg) | 432 self.writeln(msg) |
433 | 433 |
434 def write_throttled_update(self, msg): | 434 def write_throttled_update(self, msg): |
435 self._meter.write_throttled_update(msg) | 435 self._meter.write_throttled_update(msg) |
436 | 436 |
437 def write_update(self, msg): | 437 def write_update(self, msg): |
438 self._meter.write_update(msg) | 438 self._meter.write_update(msg) |
439 | 439 |
440 def writeln(self, msg): | 440 def writeln(self, msg): |
441 self._meter.writeln(msg) | 441 self._meter.writeln(msg) |
442 | 442 |
443 def flush(self): | 443 def flush(self): |
444 self._meter.flush() | 444 self._meter.flush() |
OLD | NEW |