Title: [129887] trunk/Tools
Revision
129887
Author
[email protected]
Date
2012-09-28 06:47:24 -0700 (Fri, 28 Sep 2012)

Log Message

[Qt] Make NRWT use wk2/TestExpectations file
https://bugs.webkit.org/show_bug.cgi?id=97894

Reviewed by Simon Hausmann.

* Scripts/webkitpy/layout_tests/port/qt.py: Remove unnecessary _skipped_file_search_paths function.
(QtPort.expectations_files): Add wk2 if --webkit-test-runner option added.
* Scripts/webkitpy/layout_tests/port/qt_unittest.py: Remove unnecessary test__skipped_file_search_paths function.
(QtPortTest._assert_search_path): Removed.
(QtPortTest.test_expectations_files): Add wk2 if --webkit-test-runner option added, and code cleanup.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (129886 => 129887)


--- trunk/Tools/ChangeLog	2012-09-28 13:44:43 UTC (rev 129886)
+++ trunk/Tools/ChangeLog	2012-09-28 13:47:24 UTC (rev 129887)
@@ -1,3 +1,16 @@
+2012-09-28  Csaba Osztrogonác  <[email protected]>
+
+        [Qt] Make NRWT use wk2/TestExpectations file
+        https://bugs.webkit.org/show_bug.cgi?id=97894
+
+        Reviewed by Simon Hausmann.
+
+        * Scripts/webkitpy/layout_tests/port/qt.py: Remove unnecessary _skipped_file_search_paths function.
+        (QtPort.expectations_files): Add wk2 if --webkit-test-runner option added.
+        * Scripts/webkitpy/layout_tests/port/qt_unittest.py: Remove unnecessary test__skipped_file_search_paths function.
+        (QtPortTest._assert_search_path): Removed.
+        (QtPortTest.test_expectations_files): Add wk2 if --webkit-test-runner option added, and code cleanup.
+
 2012-09-28  Mikhail Pozdnyakov  <[email protected]>
 
         [EFL][DRT] EFL's layoutTestController.keepWebHistory should enable visited links tracking

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


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py	2012-09-28 13:44:43 UTC (rev 129886)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py	2012-09-28 13:47:24 UTC (rev 129887)
@@ -142,16 +142,14 @@
     def default_baseline_search_path(self):
         return map(self._webkit_baseline_path, self._search_paths())
 
-    def _skipped_file_search_paths(self):
-        skipped_path = self._search_paths()
-        if self.get_option('webkit_test_runner') and '5.0' in self.qt_version():
-            skipped_path.append('wk2')
-        return skipped_path
-
     def expectations_files(self):
+        paths = self._search_paths()
+        if self.get_option('webkit_test_runner'):
+            paths.append('wk2')
+
         # 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()]))
+        return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in paths]))
 
     def setup_environ_for_server(self, server_name=None):
         clean_env = super(QtPort, self).setup_environ_for_server(server_name)

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


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py	2012-09-28 13:44:43 UTC (rev 129886)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py	2012-09-28 13:47:24 UTC (rev 129887)
@@ -71,14 +71,6 @@
         absolute_search_paths = map(port._webkit_baseline_path, search_paths)
         self.assertEquals(port.baseline_search_path(), absolute_search_paths)
 
-    def _assert_skipped_path(self, search_paths, os_name, use_webkit2=False, qt_version='4.8'):
-        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._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
@@ -100,19 +92,13 @@
         for case in self.search_paths_cases:
             self._assert_search_path(**case)
 
-    def test_skipped_file_search_path(self):
-        caselist = self.search_paths_cases[:]
-        for case in caselist:
-            if case['use_webkit2'] and case['qt_version'] == '5.0':
-                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))
+            if expectations_case['use_webkit2']:
+                expectations_case['search_paths'].append("wk2")
+            expectations_case['search_paths'].reverse()
+            expectations_case['search_paths'] = map(lambda path: '/mock-checkout/LayoutTests/platform/%s/TestExpectations' % (path), expectations_case['search_paths'])
             self._assert_expectations_files(**expectations_case)
 
     def test_show_results_html_file(self):
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to