Changeset 158373 in webkit


Ignore:
Timestamp:
Oct 31, 2013 11:13:10 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Run tests as if they are expected to pass when --force is given.
https://bugs.webkit.org/show_bug.cgi?id=112890

Patch by Tamas Gergely <gertom@inf.u-szeged.hu> on 2013-10-31
Reviewed by Ryosuke Niwa.

The --force switch of new-run-webkit-tests is now forces all tests to
be run with 'PASS' as expected result.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.run):

  • Scripts/webkitpy/layout_tests/models/test_expectations.py:

(TestExpectations.init):
(TestExpectations._add_expectations):

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):
(_set_up_derived_options):

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r158371 r158373  
     12013-10-31  Tamas Gergely  <gertom@inf.u-szeged.hu>
     2
     3        Run tests as if they are expected to pass when --force is given.
     4        https://bugs.webkit.org/show_bug.cgi?id=112890
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        The --force switch of new-run-webkit-tests is now forces all tests to
     9        be run with 'PASS' as expected result.
     10
     11        * Scripts/webkitpy/layout_tests/controllers/manager.py:
     12        (Manager.run):
     13        * Scripts/webkitpy/layout_tests/models/test_expectations.py:
     14        (TestExpectations.__init__):
     15        (TestExpectations._add_expectations):
     16        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     17        (parse_args):
     18        (_set_up_derived_options):
     19
    1202013-10-31  Geoffrey Garen  <ggaren@apple.com>
    221
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

    r157804 r158373  
    180180
    181181        self._printer.write_update("Parsing expectations ...")
    182         self._expectations = test_expectations.TestExpectations(self._port, test_names)
     182        self._expectations = test_expectations.TestExpectations(self._port, test_names, force_expectations_pass=self._options.force)
    183183
    184184        tests_to_run, tests_to_skip = self._prepare_lists(paths, test_names)
  • trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py

    r157831 r158373  
    834834    # the expectations into separate routines so that linting and handling overrides
    835835    # can be controlled separately, and the constructor can be more of a no-op.
    836     def __init__(self, port, tests=None, include_generic=True, include_overrides=True, expectations_to_lint=None):
     836    def __init__(self, port, tests=None, include_generic=True, include_overrides=True, expectations_to_lint=None, force_expectations_pass=False):
    837837        self._full_test_list = tests
    838838        self._test_config = port.test_configuration()
     
    843843        self._skipped_tests_warnings = []
    844844        self._expectations = []
     845        self._force_expectations_pass = force_expectations_pass
    845846
    846847        expectations_dict = expectations_to_lint or port.expectations_dict()
     
    991992    def _add_expectations(self, expectation_list):
    992993        for expectation_line in expectation_list:
    993             if not expectation_line.expectations:
     994            if self._force_expectations_pass:
     995                expectation_line.expectations = ['PASS']
     996                expectation_line.parsed_expectations = set([PASS])
     997
     998            elif not expectation_line.expectations:
    994999                continue
    9951000
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r157815 r158373  
    227227                 "'only' == only run the SKIP tests, "
    228228                 "'always' == always skip, even if listed on the command line.")),
    229         optparse.make_option("--force", dest="skipped", action="store_const", const='ignore',
    230             help="Run all tests, even those marked SKIP in the test list (same as --skipped=ignore)"),
     229        optparse.make_option("--force", action="store_true", default=False,
     230            help="Run all tests with PASS as expected result, even those marked SKIP in the test list (implies --skipped=ignore)"),
    231231        optparse.make_option("--time-out-ms",
    232232            help="Set the timeout for each test"),
     
    338338        options.additional_platform_directory = additional_platform_directories
    339339
     340    if options.force:
     341        if options.skipped not in ('ignore', 'default'):
     342            _log.warning("--force overrides --skipped=%s" % (options.skipped))
     343        options.skipped = 'ignore'
     344
    340345    if not options.http and options.skipped in ('ignore', 'only'):
    341346        _log.warning("--force/--skipped=%s overrides --no-http." % (options.skipped))
Note: See TracChangeset for help on using the changeset viewer.