Changeset 139841 in webkit


Ignore:
Timestamp:
Jan 16, 2013 12:02:33 AM (11 years ago)
Author:
commit-queue@webkit.org
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 <jussi.kukkonen@intel.com> 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):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r139840 r139841  
     12013-01-16  Jussi Kukkonen  <jussi.kukkonen@intel.com>
     2
     3        NRWT still confused about test count with --repeat-each and --iterations
     4        https://bugs.webkit.org/show_bug.cgi?id=106562
     5
     6        Reviewed by Dirk Pranke.
     7
     8        Fix the printed unique test count and skipped count. This
     9        seems to have broken in r127688 ("NRWT lies about the number
     10        of tests that it's skipping when used with --repeat-each").
     11
     12        Also add a test for print_found()
     13
     14        * Scripts/webkitpy/layout_tests/views/printing.py:
     15        (Printer.print_found):
     16        * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
     17        (Testprinter.test_details):
     18        (Testprinter):
     19        (Testprinter.test_found):
     20
    1212013-01-15  Zan Dobersek  <zdobersek@igalia.com>
    222
  • trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py

    r137770 r139841  
    9999
    100100    def print_found(self, num_all_test_files, num_to_run, repeat_each, iterations):
    101         num_unique_tests = num_to_run / (repeat_each * iterations)
    102         found_str = 'Found %s; running %d' % (grammar.pluralize('test', num_all_test_files), num_unique_tests)
     101        found_str = 'Found %s; running %d' % (grammar.pluralize('test', num_all_test_files), num_to_run)
    103102        if repeat_each * iterations > 1:
    104103            found_str += ' (%d times each: --repeat-each=%d --iterations=%d)' % (repeat_each * iterations, repeat_each, iterations)
    105         found_str += ', skipping %d' % (num_all_test_files - num_unique_tests)
     104        found_str += ', skipping %d' % (num_all_test_files - num_to_run)
    106105        self._print_default(found_str + '.')
     106        print (found_str)
    107107
    108108    def print_expected(self, run_results, tests_with_result_type_callback):
  • trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py

    r137621 r139841  
    176176        printer.print_finished_test(result, expected=False, exp_str='', got_str='')
    177177        self.assertNotEmpty(err)
     178
     179    def test_print_found(self):
     180        printer, err = self.get_printer()
     181
     182        printer.print_found(100, 10, 1, 1)
     183        self.assertWritten(err, ["Found 100 tests; running 10, skipping 90.\n"])
     184
     185        self.reset(err)
     186        printer.print_found(100, 10, 2, 3)
     187        self.assertWritten(err, ["Found 100 tests; running 10 (6 times each: --repeat-each=2 --iterations=3), skipping 90.\n"])
Note: See TracChangeset for help on using the changeset viewer.