Title: [122217] trunk
Revision
122217
Author
[email protected]
Date
2012-07-10 06:05:17 -0700 (Tue, 10 Jul 2012)

Log Message

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

Patch by János Badics <[email protected]> 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):

Modified Paths

Added Paths

Diff

Added: trunk/LayoutTests/platform/qt-4.8/TestExpectations ( => )


Added: trunk/LayoutTests/platform/qt-5.0/TestExpectations
===================================================================

Added: trunk/LayoutTests/platform/qt-5.0-wk1/TestExpectations ( => )


Added: trunk/LayoutTests/platform/qt-5.0-wk2/TestExpectations
===================================================================

Added: trunk/LayoutTests/platform/qt-arm/TestExpectations ( => )


Added: trunk/LayoutTests/platform/qt-linux/TestExpectations
===================================================================

Added: trunk/LayoutTests/platform/qt-mac/TestExpectations ( => )


Added: trunk/LayoutTests/platform/qt-win/TestExpectations
===================================================================

Modified: trunk/Tools/ChangeLog (122216 => 122217)


--- trunk/Tools/ChangeLog	2012-07-10 12:23:46 UTC (rev 122216)
+++ trunk/Tools/ChangeLog	2012-07-10 13:05:17 UTC (rev 122217)
@@ -1,3 +1,16 @@
+2012-07-10  János Badics  <[email protected]>
+
+        [Qt][NRWT] Enable cascaded TestExpectations
+        https://bugs.webkit.org/show_bug.cgi?id=89108
+
+        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):
+
 2012-07-10  Christophe Dumez  <[email protected]>
 
         [EFL] WebKit DRT and WTR fail to build due to undefined reference to WTF::MD5::*

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py (122216 => 122217)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py	2012-07-10 12:23:46 UTC (rev 122216)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py	2012-07-10 13:05:17 UTC (rev 122217)
@@ -140,6 +140,11 @@
             skipped_path.append('wk2')
         return skipped_path
 
+    def expectations_files(self):
+        # expectations_files() uses the directories listed in _search_paths reversed.
+        # e.g. qt -> qt-linux -> qt-4.8
+        return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in self._search_paths()]))
+
     def setup_environ_for_server(self, server_name=None):
         clean_env = WebKitPort.setup_environ_for_server(self, server_name)
         clean_env['QTWEBKIT_PLUGIN_PATH'] = self._build_path('lib/plugins')

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py (122216 => 122217)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py	2012-07-10 12:23:46 UTC (rev 122216)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py	2012-07-10 13:05:17 UTC (rev 122217)
@@ -28,6 +28,7 @@
 
 import unittest
 import os
+from copy import deepcopy
 
 from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
 from webkitpy.common.system.outputcapture import OutputCapture
@@ -78,6 +79,17 @@
                               options=MockOptions(webkit_test_runner=use_webkit2, platform='qt'))
         self.assertEquals(port._skipped_file_search_paths(), search_paths)
 
+    def _assert_expectations_files(self, search_paths, os_name, use_webkit2=False, qt_version='4.8'):
+        # FIXME: Port constructors should not "parse" the port name, but
+        # rather be passed components (directly or via setters).  Once
+        # we fix that, this method will need a re-write.
+        host = MockSystemHost(os_name=os_name)
+        host.executive = MockExecutive2(self._qt_version(qt_version))
+        port_name = 'qt-' + os_name
+        port = self.make_port(host=host, qt_version=qt_version, port_name=port_name,
+                              options=MockOptions(webkit_test_runner=use_webkit2, platform='qt'))
+        self.assertEquals(port.expectations_files(), search_paths)
+
     def _qt_version(self, qt_version):
         if qt_version in '4.8':
             return 'QMake version 2.01a\nUsing Qt version 4.8.0 in /usr/local/Trolltech/Qt-4.8.2/lib'
@@ -95,6 +107,14 @@
                 case['search_paths'].append("wk2")
             self._assert_skipped_path(**case)
 
+    def test_expectations_files(self):
+        for case in self.search_paths_cases:
+            expectations_case = deepcopy(case)
+            expectations_case['search_paths'] = []
+            for path in reversed(case['search_paths']):
+                expectations_case['search_paths'].append('/mock-checkout/LayoutTests/platform/%s/TestExpectations' % (path))
+            self._assert_expectations_files(**expectations_case)
+
     def test_show_results_html_file(self):
         port = self.make_port()
         port._executive = MockExecutive(should_log=True)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to