Title: [90607] trunk/Tools
Revision
90607
Author
dpra...@chromium.org
Date
2011-07-07 19:22:39 -0700 (Thu, 07 Jul 2011)

Log Message

test-webkitpy fails on chromium win
https://bugs.webkit.org/show_bug.cgi?id=64137

Reviewed by Eric Seidel.

test-webkitpy doesn't play nicely with the multiprocessing
module on win32. An earlier change actually reenabled the tests
on win32 by mistake.

This patch also fixes a few cases where path names will trip
things up on win32 (e.g., by testing unix paths on windows).
We do not lose any real coverage here with those fixes.

* Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
* Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py:
* Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

Modified Paths

Property Changed

Diff

Modified: trunk/Tools/ChangeLog (90606 => 90607)


--- trunk/Tools/ChangeLog	2011-07-08 02:13:05 UTC (rev 90606)
+++ trunk/Tools/ChangeLog	2011-07-08 02:22:39 UTC (rev 90607)
@@ -1,3 +1,23 @@
+2011-07-07  Dirk Pranke  <dpra...@chromium.org>
+
+        test-webkitpy fails on chromium win
+        https://bugs.webkit.org/show_bug.cgi?id=64137
+
+        Reviewed by Eric Seidel.
+
+        test-webkitpy doesn't play nicely with the multiprocessing
+        module on win32. An earlier change actually reenabled the tests
+        on win32 by mistake.
+
+        This patch also fixes a few cases where path names will trip
+        things up on win32 (e.g., by testing unix paths on windows).
+        We do not lose any real coverage here with those fixes.
+
+        * Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py:
+        * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+
 2011-07-07  Leandro Pereira  <lean...@profusion.mobi>
 
         [ImageDiff] Calculate/print difference right after reading baseline image.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (90606 => 90607)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2011-07-08 02:13:05 UTC (rev 90606)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2011-07-08 02:22:39 UTC (rev 90607)
@@ -604,11 +604,11 @@
         raise NotImplementedError('Port.path_to_test_expectations_file')
 
     def relative_test_filename(self, filename):
-        """Relative unix-style path for a filename under the LayoutTests
+        """Returns a test_name a realtive unix-style path for a filename under the LayoutTests
         directory. Filenames outside the LayoutTests directory should raise
         an error."""
-        # FIXME: On Windows, does this return test_names with forward slashes,
-        # or windows-style relative paths?
+        # Ports that run on windows need to override this method to deal with
+        # filenames with backslashes in them.
         assert filename.startswith(self.layout_tests_dir()), "%s did not start with %s" % (filename, self.layout_tests_dir())
         return filename[len(self.layout_tests_dir()) + 1:]
 

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py (90606 => 90607)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py	2011-07-08 02:13:05 UTC (rev 90606)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py	2011-07-08 02:22:39 UTC (rev 90607)
@@ -24,35 +24,37 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import sys
 import unittest
 
 from webkitpy.tool import mocktool
 import chromium_gpu
 
 from webkitpy.layout_tests.port import factory
+from webkitpy.layout_tests.port import port_testcase
 
 class ChromiumGpuTest(unittest.TestCase):
-    def test_get_chromium_gpu_linux(self):
-        self.assertOverridesWorked('chromium-gpu-linux')
+    def integration_test_chromium_gpu_linux(self):
+        if sys.platform not in ('linux2', 'linux3'):
+            return
+        self.assert_port_works('chromium-gpu-linux')
+        self.assert_port_works('chromium-gpu-linux', 'chromium-gpu', 'linux2')
+        self.assert_port_works('chromium-gpu-linux', 'chromium-gpu', 'linux3')
 
-    def test_get_chromium_gpu_mac(self):
-        self.assertOverridesWorked('chromium-gpu-mac')
+    def integration_test_chromium_gpu_mac(self):
+        if sys.platform != 'darwin':
+            return
+        self.assert_port_works('chromium-gpu-mac')
+        self.assert_port_works('chromium-gpu-mac', 'chromium-gpu', 'darwin')
 
-    def test_get_chromium_gpu_win(self):
-        self.assertOverridesWorked('chromium-gpu-win')
+    def integration_test_chromium_gpu_win(self):
+        if sys.platform not in ('cygwin', 'win32'):
+            return
+        self.assert_port_works('chromium-gpu-win')
+        self.assert_port_works('chromium-gpu-win', 'chromium-gpu', 'win32')
+        self.assert_port_works('chromium-gpu-win', 'chromium-gpu', 'cygwin')
 
-    def test_get_chromium_gpu__on_linux(self):
-        self.assertOverridesWorked('chromium-gpu-linux', 'chromium-gpu', 'linux2')
-        self.assertOverridesWorked('chromium-gpu-linux', 'chromium-gpu', 'linux3')
-
-    def test_get_chromium_gpu__on_mac(self):
-        self.assertOverridesWorked('chromium-gpu-mac', 'chromium-gpu', 'darwin')
-
-    def test_get_chromium_gpu__on_win(self):
-        self.assertOverridesWorked('chromium-gpu-win', 'chromium-gpu', 'win32')
-        self.assertOverridesWorked('chromium-gpu-win', 'chromium-gpu', 'cygwin')
-
-    def assertOverridesWorked(self, port_name, input_name=None, platform=None):
+    def assert_port_works(self, port_name, input_name=None, platform=None):
         # test that we got the right port
         mock_options = mocktool.MockOptions(accelerated_compositing=None,
                                             accelerated_2d_canvas=None,
@@ -82,6 +84,8 @@
         # Test that we're limiting to the correct directories.
         # These two tests are picked mostly at random, but we make sure they
         # exist separately from being filtered out by the port.
+
+        # Note that this is using a real filesystem.
         files = port.tests(None)
 
         path = 'compositing/checkerboard.html'
@@ -123,4 +127,4 @@
 
 
 if __name__ == '__main__':
-    unittest.main()
+    port_testcase.main()
Property changes on: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py
___________________________________________________________________

Added: svn:executable

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py (90606 => 90607)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py	2011-07-08 02:13:05 UTC (rev 90606)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py	2011-07-08 02:22:39 UTC (rev 90607)
@@ -60,6 +60,9 @@
     def test_check_sys_deps(self):
         pass
 
+    def test_uses_apache(self):
+        pass
+
     def integration_test_http_lock(self):
         pass
 
Property changes on: trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
___________________________________________________________________

Added: svn:executable

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (90606 => 90607)


--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py	2011-07-08 02:13:05 UTC (rev 90606)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py	2011-07-08 02:22:39 UTC (rev 90607)
@@ -51,7 +51,7 @@
 
 # FIXME: remove this when we fix test-webkitpy to work properly on cygwin
 # (bug 63846).
-SHOULD_TEST_PROCESSES = multiprocessing and sys.platform not in ('cygwin')
+SHOULD_TEST_PROCESSES = multiprocessing and sys.platform not in ('cygwin', 'win32')
 
 from webkitpy.common import array_stream
 from webkitpy.common.system import outputcapture
Property changes on: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
___________________________________________________________________

Added: svn:executable

_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to