Title: [139841] trunk/Tools
Revision
139841
Author
[email protected]
Date
2013-01-16 00:02:33 -0800 (Wed, 16 Jan 2013)

Log Message

NRWT still confused about test count with --repeat-each and --iterations
https://bugs.webkit.org/show_bug.cgi?id=106562

Patch by Jussi Kukkonen <[email protected]> on 2013-01-16
Reviewed by Dirk Pranke.

Fix the printed unique test count and skipped count. This
seems to have broken in r127688 ("NRWT lies about the number
of tests that it's skipping when used with --repeat-each").

Also add a test for print_found()

* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_found):
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.test_details):
(Testprinter):
(Testprinter.test_found):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (139840 => 139841)


--- trunk/Tools/ChangeLog	2013-01-16 07:53:21 UTC (rev 139840)
+++ trunk/Tools/ChangeLog	2013-01-16 08:02:33 UTC (rev 139841)
@@ -1,3 +1,23 @@
+2013-01-16  Jussi Kukkonen  <[email protected]>
+
+        NRWT still confused about test count with --repeat-each and --iterations
+        https://bugs.webkit.org/show_bug.cgi?id=106562
+
+        Reviewed by Dirk Pranke.
+
+        Fix the printed unique test count and skipped count. This
+        seems to have broken in r127688 ("NRWT lies about the number
+        of tests that it's skipping when used with --repeat-each").
+
+        Also add a test for print_found()
+
+        * Scripts/webkitpy/layout_tests/views/printing.py:
+        (Printer.print_found):
+        * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+        (Testprinter.test_details):
+        (Testprinter):
+        (Testprinter.test_found):
+
 2013-01-15  Zan Dobersek  <[email protected]>
 
         Unreviewed follow-up to r139769.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py (139840 => 139841)


--- trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py	2013-01-16 07:53:21 UTC (rev 139840)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py	2013-01-16 08:02:33 UTC (rev 139841)
@@ -98,12 +98,12 @@
         self._print_default('')
 
     def print_found(self, num_all_test_files, num_to_run, repeat_each, iterations):
-        num_unique_tests = num_to_run / (repeat_each * iterations)
-        found_str = 'Found %s; running %d' % (grammar.pluralize('test', num_all_test_files), num_unique_tests)
+        found_str = 'Found %s; running %d' % (grammar.pluralize('test', num_all_test_files), num_to_run)
         if repeat_each * iterations > 1:
             found_str += ' (%d times each: --repeat-each=%d --iterations=%d)' % (repeat_each * iterations, repeat_each, iterations)
-        found_str += ', skipping %d' % (num_all_test_files - num_unique_tests)
+        found_str += ', skipping %d' % (num_all_test_files - num_to_run)
         self._print_default(found_str + '.')
+        print (found_str)
 
     def print_expected(self, run_results, tests_with_result_type_callback):
         self._print_expected_results_of_type(run_results, test_expectations.PASS, "passes", tests_with_result_type_callback)

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py (139840 => 139841)


--- trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py	2013-01-16 07:53:21 UTC (rev 139840)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py	2013-01-16 08:02:33 UTC (rev 139841)
@@ -175,3 +175,13 @@
         printer.print_started_test('passes/image.html')
         printer.print_finished_test(result, expected=False, exp_str='', got_str='')
         self.assertNotEmpty(err)
+
+    def test_print_found(self):
+        printer, err = self.get_printer()
+
+        printer.print_found(100, 10, 1, 1)
+        self.assertWritten(err, ["Found 100 tests; running 10, skipping 90.\n"])
+
+        self.reset(err)
+        printer.print_found(100, 10, 2, 3)
+        self.assertWritten(err, ["Found 100 tests; running 10 (6 times each: --repeat-each=2 --iterations=3), skipping 90.\n"])
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to