Changeset 219300 in webkit


Ignore:
Timestamp:
Jul 10, 2017 11:07:10 AM (7 years ago)
Author:
zandobersek@gmail.com
Message:

[WPE] Fix layout test baseline and TestExpectations hierarchy
https://bugs.webkit.org/show_bug.cgi?id=174092

Reviewed by Michael Catanzaro.

Like for the GTK+ port, override the default_baseline_search_path() and
_port_specific_expectations_files() methods in the webkitpy.port.WPEPort class.
Both methods operate on a short list of search paths that defaults to 'wpe' and
'wk2', along with any other user-specified platform directory.

The test_expectations_file_position() method is overridden for testing purposes,
and relevant unit tests are added.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort._search_paths):
(WPEPort):
(WPEPort.default_baseline_search_path):
(WPEPort._port_specific_expectations_files):
(WPEPort.test_expectations_file_position):

  • Scripts/webkitpy/port/wpe_unittest.py:

(WPEPortTest.test_default_baseline_search_path):
(WPEPortTest):
(WPEPortTest.test_port_specific_expectations_files):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r219297 r219300  
     12017-07-10  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [WPE] Fix layout test baseline and TestExpectations hierarchy
     4        https://bugs.webkit.org/show_bug.cgi?id=174092
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Like for the GTK+ port, override the default_baseline_search_path() and
     9        _port_specific_expectations_files() methods in the webkitpy.port.WPEPort class.
     10        Both methods operate on a short list of search paths that defaults to 'wpe' and
     11        'wk2', along with any other user-specified platform directory.
     12
     13        The test_expectations_file_position() method is overridden for testing purposes,
     14        and relevant unit tests are added.
     15
     16        * Scripts/webkitpy/port/wpe.py:
     17        (WPEPort._search_paths):
     18        (WPEPort):
     19        (WPEPort.default_baseline_search_path):
     20        (WPEPort._port_specific_expectations_files):
     21        (WPEPort.test_expectations_file_position):
     22        * Scripts/webkitpy/port/wpe_unittest.py:
     23        (WPEPortTest.test_default_baseline_search_path):
     24        (WPEPortTest):
     25        (WPEPortTest.test_port_specific_expectations_files):
     26
    1272017-07-10  Chris Dumez  <cdumez@apple.com>
    228
  • trunk/Tools/Scripts/webkitpy/port/wpe.py

    r218270 r219300  
    8282        return self._built_executables_path('ImageDiff')
    8383
     84    def _search_paths(self):
     85        return [self.port_name, 'wk2'] + self.get_option("additional_platform_directory", [])
     86
     87    def default_baseline_search_path(self):
     88        return map(self._webkit_baseline_path, self._search_paths())
     89
     90    def _port_specific_expectations_files(self):
     91        return map(lambda x: self._filesystem.join(self._webkit_baseline_path(x), 'TestExpectations'), reversed(self._search_paths()))
     92
     93    def test_expectations_file_position(self):
     94        # WPE port baseline search path is wpe -> wk2 -> generic, so port test expectations file is at third to last position.
     95        return 2
     96
    8497    def _get_crash_log(self, name, pid, stdout, stderr, newer_than, target_host=None):
    8598        name = "WPEWebProcess" if name == "WebProcess" else name
  • trunk/Tools/Scripts/webkitpy/port/wpe_unittest.py

    r218270 r219300  
    5252        return port
    5353
     54    def test_default_baseline_search_path(self):
     55        port = self.make_port()
     56        self.assertEqual(port.default_baseline_search_path(), ['/mock-checkout/LayoutTests/platform/wpe',
     57            '/mock-checkout/LayoutTests/platform/wk2'])
     58
     59    def test_port_specific_expectations_files(self):
     60        port = self.make_port()
     61        self.assertEqual(port.expectations_files(), ['/mock-checkout/LayoutTests/TestExpectations',
     62            '/mock-checkout/LayoutTests/platform/wk2/TestExpectations',
     63            '/mock-checkout/LayoutTests/platform/wpe/TestExpectations'])
     64
    5465    def test_default_timeout_ms(self):
    5566        self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 15000)
Note: See TracChangeset for help on using the changeset viewer.