Title: [192565] trunk/Tools
- Revision
- 192565
- Author
- a...@apple.com
- Date
- 2015-11-17 22:27:09 -0800 (Tue, 17 Nov 2015)
Log Message
run-webkit-tests should not truncate persistent lines
https://bugs.webkit.org/show_bug.cgi?id=151376
rdar://problem/23162775
Reviewed by Antti Koivisto.
It is OK to truncate progress lines, but it's not OK to truncate error (or otherwise
unexpected result) messages that remain on the screen to be read. In practice, this
almost always truncates the test path, which is important to see.
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer._test_status_line):
(Printer.print_finished_test):
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.test_test_status_line):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (192564 => 192565)
--- trunk/Tools/ChangeLog 2015-11-18 03:00:43 UTC (rev 192564)
+++ trunk/Tools/ChangeLog 2015-11-18 06:27:09 UTC (rev 192565)
@@ -1,3 +1,21 @@
+2015-11-17 Alexey Proskuryakov <a...@apple.com>
+
+ run-webkit-tests should not truncate persistent lines
+ https://bugs.webkit.org/show_bug.cgi?id=151376
+ rdar://problem/23162775
+
+ Reviewed by Antti Koivisto.
+
+ It is OK to truncate progress lines, but it's not OK to truncate error (or otherwise
+ unexpected result) messages that remain on the screen to be read. In practice, this
+ almost always truncates the test path, which is important to see.
+
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer._test_status_line):
+ (Printer.print_finished_test):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.test_test_status_line):
+
2015-11-16 Carlos Garcia Campos <cgar...@igalia.com>
Unreviewed. Fix GTK+ unit tests after r192469.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py (192564 => 192565)
--- trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py 2015-11-18 03:00:43 UTC (rev 192564)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py 2015-11-18 06:27:09 UTC (rev 192565)
@@ -287,10 +287,10 @@
self._print_quiet(summary)
self._print_quiet("")
- def _test_status_line(self, test_name, suffix):
+ def _test_status_line(self, test_name, suffix, truncate=True):
format_string = '[%d/%d] %s%s'
status_line = format_string % (self.num_started, self.num_tests, test_name, suffix)
- if len(status_line) > self._meter.number_of_columns():
+ if truncate and len(status_line) > self._meter.number_of_columns():
overflow_columns = len(status_line) - self._meter.number_of_columns()
ellipsis = '...'
if len(test_name) < overflow_columns + len(ellipsis) + 2:
@@ -324,7 +324,7 @@
if self._options.details:
self._print_test_trace(result, exp_str, got_str)
elif (self._options.verbose and not self._options.debug_rwt_logging) or not expected:
- self.writeln(self._test_status_line(test_name, result_message))
+ self.writeln(self._test_status_line(test_name, result_message, truncate=False))
elif self.num_started == self.num_tests:
self._meter.write_update('')
else:
@@ -334,7 +334,7 @@
self._completed_tests.append([test_name, result_message])
for test_name, result_message in self._completed_tests:
- self._meter.write_throttled_update(self._test_status_line(test_name, result_message))
+ self._meter.write_throttled_update(self._test_status_line(test_name, result_message, truncate=False))
self._completed_tests = []
self._running_tests.remove(test_name)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py (192564 => 192565)
--- trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py 2015-11-18 03:00:43 UTC (rev 192564)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py 2015-11-18 06:27:09 UTC (rev 192565)
@@ -150,6 +150,11 @@
self.assertEqual(80, len(actual))
self.assertEqual(actual, '[0/0] fast/dom/HTMLFormElement/associa...after-index-assertion-fail1.html passed')
+ printer._meter.number_of_columns = lambda: 80
+ actual = printer._test_status_line('fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html', ' passed', truncate=False)
+ self.assertEqual(90, len(actual))
+ self.assertEqual(actual, '[0/0] fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html passed')
+
printer._meter.number_of_columns = lambda: 89
actual = printer._test_status_line('fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html', ' passed')
self.assertEqual(89, len(actual))
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes