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

eric at webkit.org eric at webkit.org
Wed Dec 22 15:35:31 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1d684e82ff1ad3c599a49e7020dace1d247417d1
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 8 22:19:20 2010 +0000

    2010-11-08  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Adam Barth.
    
            webkit-patch failure-reason explodes if a build is missing
            https://bugs.webkit.org/show_bug.cgi?id=49195
    
            This is likely a recent regression.  Adding a unit test for this case.
    
            * Scripts/webkitpy/common/net/buildbot.py:
            * Scripts/webkitpy/common/net/buildbot_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71571 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 0bc3f63..1a18426 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-08  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
+        webkit-patch failure-reason explodes if a build is missing
+        https://bugs.webkit.org/show_bug.cgi?id=49195
+
+        This is likely a recent regression.  Adding a unit test for this case.
+
+        * Scripts/webkitpy/common/net/buildbot.py:
+        * Scripts/webkitpy/common/net/buildbot_unittest.py:
+
 2010-11-08  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebKitTools/Scripts/webkitpy/common/net/buildbot.py b/WebKitTools/Scripts/webkitpy/common/net/buildbot.py
index a14bc7f..88cdd4e 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/buildbot.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/buildbot.py
@@ -220,6 +220,7 @@ class Build(object):
         results_html = "%s/results.html" % (self.results_url())
         # FIXME: This should use NetworkTransaction's 404 handling instead.
         try:
+            # It seems this can return None if the url redirects and then returns 404.
             return urllib2.urlopen(results_html)
         except urllib2.HTTPError, error:
             if error.code != 404:
diff --git a/WebKitTools/Scripts/webkitpy/common/net/buildbot_unittest.py b/WebKitTools/Scripts/webkitpy/common/net/buildbot_unittest.py
index afc9a39..4fdf24c 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/buildbot_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/buildbot_unittest.py
@@ -111,6 +111,14 @@ class BuilderTest(unittest.TestCase):
             self.assertEqual(self.builder._revision_and_build_for_filename(filename), revision_and_build)
 
 
+class BuildTest(unittest.TestCase):
+    def test_layout_test_results(self):
+        build = Build(None, None, None, None)
+        build._fetch_results_html = lambda: None
+        # Test that layout_test_results() returns None if the fetch fails.
+        self.assertEqual(build.layout_test_results(), None)
+
+
 class BuildBotTest(unittest.TestCase):
 
     _example_one_box_status = '''
diff --git a/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py b/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py
index 2f7b3e6..a7b3b0a 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py
@@ -58,6 +58,8 @@ class LayoutTestResults(object):
 
     @classmethod
     def _parse_results_html(cls, page):
+        if not page:
+            return None
         parsed_results = {}
         tables = BeautifulSoup(page).findAll("table")
         for table in tables:
diff --git a/WebKitTools/Scripts/webkitpy/common/net/layouttestresults_unittest.py b/WebKitTools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
index 44e4dbc..8490eae 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
@@ -71,6 +71,7 @@ class LayoutTestResultsTest(unittest.TestCase):
         self.assertEqual(self._expected_layout_test_results, results)
 
     def test_results_from_string(self):
+        self.assertEqual(LayoutTestResults.results_from_string(None), None)
         self.assertEqual(LayoutTestResults.results_from_string(""), None)
         results = LayoutTestResults.results_from_string(self._example_results_html)
         self.assertEqual(len(results.failing_tests()), 0)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list