[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mihaip at chromium.org mihaip at chromium.org
Wed Dec 22 13:47:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a0564fcabd1076bb34296ee939893d30378afcd9
Author: mihaip at chromium.org <mihaip at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 27 02:58:19 2010 +0000

    2010-09-26  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Ojan Vafai.
    
            new-run-webkit-httpd fails if Perl is not installed
            https://bugs.webkit.org/show_bug.cgi?id=46602
    
            Make Port._read_configuration catch all exceptions, since trying to run
            perl (because of _webkit_build_directory) when it's not installed throws
            a WindowsError or OSError, not an IOError (this became an issue after
            r68268, since ChromiumPort ends up calling Port.default_configuration in
            its constructor, which means that we're ending up on this codepath in
            non-NRWT cases too, e.g. for the Chromium NaCl tests, which use
            new-run-webkit-httpd).
    
            * Scripts/webkitpy/layout_tests/port/base.py:
            * Scripts/webkitpy/layout_tests/port/base_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68365 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index f77d15d..6065cd0 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-26  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Ojan Vafai.
+
+        new-run-webkit-httpd fails if Perl is not installed
+        https://bugs.webkit.org/show_bug.cgi?id=46602
+        
+        Make Port._read_configuration catch all exceptions, since trying to run
+        perl (because of _webkit_build_directory) when it's not installed throws
+        a WindowsError or OSError, not an IOError (this became an issue after 
+        r68268, since ChromiumPort ends up calling Port.default_configuration in
+        its constructor, which means that we're ending up on this codepath in
+        non-NRWT cases too, e.g. for the Chromium NaCl tests, which use
+        new-run-webkit-httpd).
+
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+
 2010-09-26  Gyuyoung Kim  <gyuyoung.kim at samsung.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
index 32a4e17..6a5d43b 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
@@ -683,7 +683,7 @@ class Port(object):
         try:
             with self._open_configuration_file() as file:
                 return file.readline().rstrip()
-        except IOError, e:
+        except:
             return None
 
     # FIXME: This list may be incomplete as Apple has some sekret configs.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py
index 1a6e410..71877b3 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py
@@ -57,16 +57,17 @@ class MockExecutive():
 
 class UnitTestPort(base.Port):
     """Subclass of base.Port used for unit testing."""
-    def __init__(self, configuration_contents=None, executive_exception=None):
+    def __init__(self, configuration_contents=None, configuration_exception=IOError, executive_exception=None):
         base.Port.__init__(self)
         self._configuration_contents = configuration_contents
+        self._configuration_exception = configuration_exception
         if executive_exception:
             self._executive = MockExecutive(executive_exception)
 
     def _open_configuration_file(self):
         if self._configuration_contents:
             return NewStringIO(self._configuration_contents)
-        raise IOError
+        raise self._configuration_exception
 
 
 class PortTest(unittest.TestCase):
@@ -191,9 +192,14 @@ class PortTest(unittest.TestCase):
         self.assertFalse('nosuchthing' in diff)
 
     def test_default_configuration_notfound(self):
+        # Regular IOError thrown while trying to get the configuration.
         port = UnitTestPort()
         self.assertEqual(port.default_configuration(), "Release")
 
+        # More exotic OSError thrown.
+        port = UnitTestPort(configuration_exception=OSError)
+        self.assertEqual(port.default_configuration(), "Release")
+
     def test_layout_tests_skipping(self):
         port = base.Port()
         port.skipped_layout_tests = lambda: ['foo/bar.html', 'media']

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list