Changeset 205539 in webkit


Ignore:
Timestamp:
Sep 7, 2016 1:55:44 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Using tests-options.json to compute whether tests are slow
https://bugs.webkit.org/show_bug.cgi?id=161626

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-07
Reviewed by Darin Adler.

Tools:

  • Scripts/webkitpy/layout_tests/controllers/manager_unittest.py: Updated first test to use a MockHost.
  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.init): Loading tests-options.json
(Manager._test_is_slow): Computing timeout value based on tests-options.json.

LayoutTests:

  • TestExpectations: Removing slow WPT expectations now that they are handled through tests-options.json.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205537 r205539  
     12016-09-07  Youenn Fablet  <youenn@apple.com>
     2
     3        Using tests-options.json to compute whether tests are slow
     4        https://bugs.webkit.org/show_bug.cgi?id=161626
     5
     6        Reviewed by Darin Adler.
     7
     8        * TestExpectations: Removing slow WPT expectations now that they are handled through tests-options.json.
     9
    1102016-09-06  Carlos Garcia Campos  <cgarcia@igalia.com>
    211
  • trunk/LayoutTests/TestExpectations

    r205503 r205539  
    263263imported/w3c/web-platform-tests/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.sub.html [ Pass Failure ]
    264264
    265 # W3C XMLHttpRequest tests
    266 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-aborted.html [ Slow ]
    267 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html [ Slow ]
    268 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overrides.html [ Slow ]
    269 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html [ Slow ]
    270 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-simple.html [ Slow ]
    271 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html [ Slow ]
    272 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-twice.html [ Slow ]
    273 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html [ Slow ]
    274 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html [ Slow ]
    275 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html [ Slow ]
    276 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html [ Slow ]
    277 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker.html [ Slow ]
    278 imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html [ Slow ]
    279265# XMLHttpRequest tests requiring DTR/WTR to allow other URLs than localhost to not be blocked and be reachable (www2.localhost)
    280266imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-bogus.htm [ Skip ]
  • trunk/Tools/ChangeLog

    r205538 r205539  
     12016-09-07  Youenn Fablet  <youenn@apple.com>
     2
     3        Using tests-options.json to compute whether tests are slow
     4        https://bugs.webkit.org/show_bug.cgi?id=161626
     5
     6        Reviewed by Darin Adler.
     7
     8        * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py: Updated first test to use a MockHost.
     9        * Scripts/webkitpy/layout_tests/controllers/manager.py:
     10        (Manager.__init__): Loading tests-options.json
     11        (Manager._test_is_slow): Computing timeout value based on tests-options.json.
     12
    1132016-09-07  Hunseop Jeong  <hs85.jeong@samsung.com>
    214
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

    r205486 r205539  
    8787        self._runner = LayoutTestRunner(self._options, self._port, self._printer, self._results_directory, self._test_is_slow)
    8888
     89        test_options_json_path = self._port.path_from_webkit_base(self.LAYOUT_TESTS_DIRECTORY, "tests-options.json")
     90        self._tests_options = json.loads(self._filesystem.read_text_file(test_options_json_path)) if self._filesystem.exists(test_options_json_path) else {}
     91
    8992    def _collect_tests(self, args):
    9093        return self._finder.find_tests(self._options, args)
     
    132135
    133136    def _test_is_slow(self, test_file):
    134         return self._expectations.model().has_modifier(test_file, test_expectations.SLOW)
     137        if self._expectations.model().has_modifier(test_file, test_expectations.SLOW):
     138            return True
     139        return "slow" in self._tests_options.get(test_file, [])
    135140
    136141    def needs_servers(self, test_names):
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py

    r204477 r205539  
    4949
    5050        def get_manager():
    51             port = Mock()  # FIXME: Use a tighter mock.
     51            host = MockHost()
     52            port = host.port_factory.get()
    5253            port.TEST_PATH_SEPARATOR = '/'
    5354            port.web_platform_test_server_doc_root = get_wpt_doc_root
Note: See TracChangeset for help on using the changeset viewer.