Changeset 122217 in webkit


Ignore:
Timestamp:
Jul 10, 2012 6:05:17 AM (12 years ago)
Author:
Csaba Osztrogonác
Message:

[Qt][NRWT] Enable cascaded TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=89108

Patch by János Badics <János Badics> on 2012-07-10
Reviewed by Dirk Pranke.

  • Scripts/webkitpy/layout_tests/port/qt.py:

(QtPort.expectations_files):

  • Scripts/webkitpy/layout_tests/port/qt_unittest.py:

(QtPortTest._assert_expectations_files):
(QtPortTest.test_expectations_files):

Location:
trunk
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r122213 r122217  
     12012-07-10  János Badics  <jbadics@inf.u-szeged.hu>
     2
     3        [Qt][NRWT] Enable cascaded TestExpectations
     4        https://bugs.webkit.org/show_bug.cgi?id=89108
     5
     6        Reviewed by Dirk Pranke.
     7
     8        * Scripts/webkitpy/layout_tests/port/qt.py:
     9        (QtPort.expectations_files):
     10        * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
     11        (QtPortTest._assert_expectations_files):
     12        (QtPortTest.test_expectations_files):
     13
    1142012-07-10  Christophe Dumez  <christophe.dumez@intel.com>
    215
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py

    r122151 r122217  
    141141        return skipped_path
    142142
     143    def expectations_files(self):
     144        # expectations_files() uses the directories listed in _search_paths reversed.
     145        # e.g. qt -> qt-linux -> qt-4.8
     146        return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in self._search_paths()]))
     147
    143148    def setup_environ_for_server(self, server_name=None):
    144149        clean_env = WebKitPort.setup_environ_for_server(self, server_name)
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py

    r122151 r122217  
    2929import unittest
    3030import os
     31from copy import deepcopy
    3132
    3233from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
     
    7980        self.assertEquals(port._skipped_file_search_paths(), search_paths)
    8081
     82    def _assert_expectations_files(self, search_paths, os_name, use_webkit2=False, qt_version='4.8'):
     83        # FIXME: Port constructors should not "parse" the port name, but
     84        # rather be passed components (directly or via setters).  Once
     85        # we fix that, this method will need a re-write.
     86        host = MockSystemHost(os_name=os_name)
     87        host.executive = MockExecutive2(self._qt_version(qt_version))
     88        port_name = 'qt-' + os_name
     89        port = self.make_port(host=host, qt_version=qt_version, port_name=port_name,
     90                              options=MockOptions(webkit_test_runner=use_webkit2, platform='qt'))
     91        self.assertEquals(port.expectations_files(), search_paths)
     92
    8193    def _qt_version(self, qt_version):
    8294        if qt_version in '4.8':
     
    95107                case['search_paths'].append("wk2")
    96108            self._assert_skipped_path(**case)
     109
     110    def test_expectations_files(self):
     111        for case in self.search_paths_cases:
     112            expectations_case = deepcopy(case)
     113            expectations_case['search_paths'] = []
     114            for path in reversed(case['search_paths']):
     115                expectations_case['search_paths'].append('/mock-checkout/LayoutTests/platform/%s/TestExpectations' % (path))
     116            self._assert_expectations_files(**expectations_case)
    97117
    98118    def test_show_results_html_file(self):
Note: See TracChangeset for help on using the changeset viewer.