Changeset 57622 in webkit


Ignore:
Timestamp:
Apr 14, 2010 5:59:11 PM (14 years ago)
Author:
dpranke@chromium.org
Message:

2010-04-15 Dirk Pranke <dpranke@chromium.org>

Reviewed by Adam Barth.

Add some very minimal unit tests for new-run-webkit-tests. This should
be enough to catch egregious brokenness like syntax errors and import
declaration issues.

https://bugs.webkit.org/show_bug.cgi?id=37432

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py: Added.
Location:
trunk/WebKitTools
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r57602 r57622  
     12010-04-15  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Add some very minimal unit tests for new-run-webkit-tests. This should
     6        be enough to catch egregious brokenness like syntax errors and import
     7        declaration issues.
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=37432
     10
     11        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     12        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py: Added.
     13
    1142010-04-14  Brian Weinstein  <bweinstein@apple.com>
    215
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r57486 r57622  
    605605        return self._contains_tests(self.HTTP_SUBDIR)
    606606
    607     def run(self, result_summary):
     607    def run(self, result_summary, print_results):
    608608        """Run all our tests on all our test files.
    609609
     
    613613        Args:
    614614          result_summary: a summary object tracking the test results.
     615          print_results: whether or not to print the summary at the end
    615616
    616617        Return:
     
    668669        sys.stderr.flush()
    669670
    670         if (LOG_DETAILED_PROGRESS in self._options.log or
    671             (LOG_UNEXPECTED in self._options.log and
    672              result_summary.total != result_summary.expected)):
    673             print
    674 
    675671        # This summary data gets written to stdout regardless of log level
    676         self._print_one_line_summary(result_summary.total,
    677                                   result_summary.expected)
     672        # (unless of course we're printing nothing).
     673        if print_results:
     674            if (LOG_DETAILED_PROGRESS in self._options.log or
     675                (LOG_UNEXPECTED in self._options.log and
     676                 result_summary.total != result_summary.expected)):
     677                print
     678            self._print_one_line_summary(result_summary.total,
     679                                         result_summary.expected)
    678680
    679681        unexpected_results = self._summarize_unexpected_results(result_summary,
     
    13681370
    13691371
    1370 def main(options, args):
     1372def main(options, args, print_results=True):
    13711373    """Run the tests.
    13721374
     
    13741376      options: a dictionary of command line options
    13751377      args: a list of sub directories or files to test
     1378      print_results: whether or not to log anything to stdout.
     1379          Set to false by the unit tests
    13761380    Returns:
    13771381      the number of unexpected results that occurred, or -1 if there is an
     
    15171521            test_runner.add_test_type(fuzzy_image_diff.FuzzyImageDiff)
    15181522
    1519     num_unexpected_results = test_runner.run(result_summary)
     1523    num_unexpected_results = test_runner.run(result_summary, print_results)
    15201524
    15211525    port_obj.stop_helper()
Note: See TracChangeset for help on using the changeset viewer.