check-webkit-style can't handle qt-arm, qt-win, qt-mac, qt-5.0, qt-5.0-wk1 and qt...
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2012 22:29:40 +0000 (22:29 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2012 22:29:40 +0000 (22:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=98140

Reviewed by Eric Seidel.

Fix a bug where we were always using the host OS rather than using what was passed in as part of the
port name on Qt.

There's also a bug with being able to test for qt-5.0 expectations files when on a system with
Qt 4.8 installed. I'm not sure how to solve that, so for now, stop emitting a style warning about
not checking a file.

* Scripts/webkitpy/layout_tests/port/qt.py:
(QtPort._search_paths): Use passed in OS.
* Scripts/webkitpy/style/checkers/test_expectations.py:
(TestExpectationsChecker.check): Don't warn if we don't know about the TestExpectations file.
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase.test_determine_port_from_expectations_path): Added a test case for the OS fix.
Add a commented out test for the version case.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130220 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/qt.py
Tools/Scripts/webkitpy/style/checkers/test_expectations.py
Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py

index 168f1011024f5f2b171816ea7c6162765d918c7e..006f95b1c0855d8d7991b449541dca01d53f4a22 100644 (file)
@@ -1,3 +1,25 @@
+2012-10-02  Tony Chang  <tony@chromium.org>
+
+        check-webkit-style can't handle qt-arm, qt-win, qt-mac, qt-5.0, qt-5.0-wk1 and qt-5.0-wk2 TestExpecatations
+        https://bugs.webkit.org/show_bug.cgi?id=98140
+
+        Reviewed by Eric Seidel.
+
+        Fix a bug where we were always using the host OS rather than using what was passed in as part of the
+        port name on Qt.
+
+        There's also a bug with being able to test for qt-5.0 expectations files when on a system with
+        Qt 4.8 installed. I'm not sure how to solve that, so for now, stop emitting a style warning about
+        not checking a file.
+
+        * Scripts/webkitpy/layout_tests/port/qt.py:
+        (QtPort._search_paths): Use passed in OS.
+        * Scripts/webkitpy/style/checkers/test_expectations.py:
+        (TestExpectationsChecker.check): Don't warn if we don't know about the TestExpectations file.
+        * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+        (TestExpectationsTestCase.test_determine_port_from_expectations_path): Added a test case for the OS fix.
+        Add a commented out test for the version case.
+
 2012-10-02  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
 
         Remove the last bits of MSYS support from webkitperl.
index 2e73c75a8671c518c81464b1b5a38973665a0662..46ee95d38eb4322bf4f0a69b5bea5e448c9f6eb5 100644 (file)
@@ -135,7 +135,7 @@ class QtPort(Port):
             search_paths.append('qt-4.8')
         elif version:
             search_paths.append('qt-5.0')
-        search_paths.append(self.port_name + '-' + self.host.platform.os_name)
+        search_paths.append(self.port_name + '-' + self.operating_system())
         search_paths.append(self.port_name)
         return search_paths
 
index 46403b7db9e86bfe1faa307aee3164c8d8a1e319..ae8feafdf494dfd798f4a6e555b5cf10791c455d 100644 (file)
@@ -94,8 +94,6 @@ class TestExpectationsChecker(object):
         expectations = '\n'.join(lines)
         if self._port_obj:
             self.check_test_expectations(expectations_str=expectations, tests=None)
-        else:
-            self._handle_style_error(1, 'test/expectations', 5,
-                                     'No port uses path %s for test_expectations' % self._file_path)
+
         # Warn tabs in lines as well
         self.check_tabs(lines)
index f12397787c3441e0b651f1cf6cbe2a446eaa4dfd..1516de797a4dc8629b7edba4cb971c7a5cbb475e 100644 (file)
@@ -82,6 +82,10 @@ class TestExpectationsTestCase(unittest.TestCase):
         self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl/TestExpectations')
         self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl-wk1/TestExpectations')
         self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl-wk2/TestExpectations')
+        self._expect_port_for_expectations_path('qt', 'LayoutTests/platform/qt-win/TestExpectations')
+        # FIXME: check-webkit-style doesn't know how to create port objects for all Qt version (4.8, 5.0) and
+        # will only check files based on the installed version of Qt.
+        #self._expect_port_for_expectations_path('qt', 'LayoutTests/platform/qt-5.0-wk2/TestExpectations')
 
     def assert_lines_lint(self, lines, should_pass, expected_output=None):
         self._error_collector.reset_errors()