[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 15:47:52 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 45bf5abe247fe266c39a728b7c2ac5f0fd8a8d28
Author: mihaip at chromium.org <mihaip at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 12 16:37:03 2010 +0000

    2010-11-12  Mihai Parparita  <mihaip at chromium.org>
    
            Unreviewed rollout of r71858.
    
            Rollout out r71858 since it breaks new-run-webkit-httpd as used by the
            NaCl tests.
    
            * Scripts/webkitpy/layout_tests/port/config.py:
            * Scripts/webkitpy/layout_tests/port/config_standalone.py: Removed.
            * Scripts/webkitpy/layout_tests/port/config_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71916 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 0384a68..c22e0eb 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-12  Mihai Parparita  <mihaip at chromium.org>
+
+        Unreviewed rollout of r71858.
+
+        Rollout out r71858 since it breaks new-run-webkit-httpd as used by the
+        NaCl tests.
+
+        * Scripts/webkitpy/layout_tests/port/config.py:
+        * Scripts/webkitpy/layout_tests/port/config_standalone.py: Removed.
+        * Scripts/webkitpy/layout_tests/port/config_unittest.py:
+
 2010-11-12  Benjamin Poulain  <benjamin.poulain at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/config.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/config.py
index 1d7f4fe..4a0de96 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/config.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/config.py
@@ -40,20 +40,16 @@ from webkitpy.common.system import logutils
 _log = logutils.get_logger(__file__)
 
 #
-# FIXME: This is used to record if we've already hit the filesystem to look
+# This is used to record if we've already hit the filesystem to look
 # for a default configuration. We cache this to speed up the unit tests,
-# but this can be reset with clear_cached_configuration(). This should be
-# replaced with us consistently using MockConfigs() for tests that don't
-# hit the filesystem at all and provide a reliable value.
+# but this can be reset with clear_cached_configuration().
 #
-_have_determined_configuration = False
-_configuration = "Release"
+_determined_configuration = None
 
 
 def clear_cached_configuration():
-    global _have_determined_configuration, _configuration
-    _have_determined_configuration = False
-    _configuration = "Release"
+    global _determined_configuration
+    _determined_configuration = -1
 
 
 class Config(object):
@@ -141,11 +137,8 @@ class Config(object):
 
     def _determine_configuration(self):
         # This mirrors the logic in webkitdirs.pm:determineConfiguration().
-        #
-        # FIXME: See the comment at the top of the file regarding unit tests
-        # and our use of global mutable static variables.
-        global _have_determined_configuration, _configuration
-        if not _have_determined_configuration:
+        global _determined_configuration
+        if _determined_configuration == -1:
             contents = self._read_configuration()
             if not contents:
                 contents = "Release"
@@ -153,9 +146,8 @@ class Config(object):
                 contents = "Release"
             if contents == "Development":
                 contents = "Debug"
-            _configuration = contents
-            _have_determined_configuration = True
-        return _configuration
+            _determined_configuration = contents
+        return _determined_configuration
 
     def _read_configuration(self):
         configuration_path = self._filesystem.join(self.build_directory(None),
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/config_standalone.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/config_standalone.py
deleted file mode 100644
index 3dec3b9..0000000
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/config_standalone.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#    * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#    * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""FIXME: This script is used by
-config_unittest.test_default_configuration__standalone() to read the
-default configuration to work around any possible caching / reset bugs. See
-https://bugs.webkit.org/show_bug?id=49360 for the motivation. We can remove
-this test when we remove the global configuration cache in config.py."""
-
-import os
-import unittest
-import sys
-
-
-# Ensure that webkitpy is in PYTHONPATH.
-this_dir = os.path.abspath(sys.path[0])
-up = os.path.dirname
-script_dir = up(up(up(this_dir)))
-if script_dir not in sys.path:
-    sys.path.append(script_dir)
-
-from webkitpy.common.system import executive
-from webkitpy.common.system import executive_mock
-from webkitpy.common.system import filesystem
-from webkitpy.common.system import filesystem_mock
-
-import config
-
-
-def main(argv=None):
-    if not argv:
-        argv = sys.argv
-
-    if len(argv) == 3 and argv[1] == '--mock':
-        e = executive_mock.MockExecutive2(output='foo')
-        fs = filesystem_mock.MockFileSystem({'foo/Configuration': argv[2]})
-    else:
-        e = executive.Executive()
-        fs = filesystem.FileSystem()
-
-    c = config.Config(e, fs)
-    print c.default_configuration()
-
-if __name__ == '__main__':
-    main()
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/config_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/config_unittest.py
index f5e2d3a..ed5ab8b 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/config_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/config_unittest.py
@@ -27,7 +27,6 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import os
-import sys
 import unittest
 
 from webkitpy.common.system import executive
@@ -49,7 +48,7 @@ class ConfigTest(unittest.TestCase):
 
     def assert_configuration(self, contents, expected):
         # This tests that a configuration file containing
-        # _contents_ ends up being interpreted as _expected_.
+        # _contents_ endsd up being interpreted as _expected_.
         c = self.make_config('foo', {'foo/Configuration': contents})
         self.assertEqual(c.default_configuration(), expected)
 
@@ -120,25 +119,6 @@ class ConfigTest(unittest.TestCase):
         self.assert_configuration('Unknown', 'Unknown')
         oc.restore_output()
 
-    def test_default_configuration__standalone(self):
-        # FIXME: This test runs a standalone python script to test
-        # reading the default configuration to work around any possible
-        # caching / reset bugs. See https://bugs.webkit.org/show_bug?id=49360
-        # for the motivation. We can remove this test when we remove the
-        # global configuration cache in config.py.
-        e = executive.Executive()
-        fs = filesystem.FileSystem()
-        c = config.Config(e, fs)
-        script = c.path_from_webkit_base('WebKitTools', 'Scripts',
-            'webkitpy', 'layout_tests', 'port', 'config_standalone.py')
-
-        # Note: don't use 'Release' here, since that's the normal default.
-        expected = 'Debug'
-
-        args = [sys.executable, script, '--mock', expected]
-        actual = e.run_command(args).rstrip()
-        self.assertEqual(actual, expected)
-
     def test_path_from_webkit_base(self):
         # FIXME: We use a real filesystem here. Should this move to a
         # mocked one?

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list