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

hayato at chromium.org hayato at chromium.org
Wed Dec 22 16:22:10 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 876dadc41cb5b748cac896f2a4e247a02b247c97
Author: hayato at chromium.org <hayato at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 22 19:58:29 2010 +0000

    2010-11-22  Hayato Ito  <hayato at chromium.org>
    
            Reviewed by Tony Chang.
    
            [NRWT] Retry a few times in reading a png image to avoid a race condition.
    
            https://bugs.webkit.org/show_bug.cgi?id=49924
    
            * Scripts/webkitpy/layout_tests/port/chromium.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72547 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 4a016c1..c62ca2d 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-22  Hayato Ito  <hayato at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        [NRWT] Retry a few times in reading a png image to avoid a race condition.
+
+        https://bugs.webkit.org/show_bug.cgi?id=49924
+
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+
 2010-11-22  João Paulo Rechi Vita  <jprvita at profusion.mobi>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
index 3149290..5bfb8ff 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
@@ -32,6 +32,7 @@
 from __future__ import with_statement
 
 import codecs
+import errno
 import logging
 import os
 import re
@@ -454,6 +455,21 @@ class ChromiumDriver(base.Driver):
         else:
             return None
 
+    def _output_image_with_retry(self):
+        # Retry a few more times because open() sometimes fails on Windows,
+        # raising "IOError: [Errno 13] Permission denied:"
+        retry_num = 50
+        timeout_seconds = 5.0
+        for i in range(retry_num):
+            try:
+                return self._output_image()
+            except IOError, e:
+                if e.errno == errno.EACCES:
+                    time.sleep(timeout_seconds / retry_num)
+                else:
+                    raise e
+        return self._output_image()
+
     def run_test(self, uri, timeoutms, checksum):
         output = []
         error = []
@@ -505,9 +521,10 @@ class ChromiumDriver(base.Driver):
 
             (line, crash) = self._write_command_and_read_line(input=None)
 
+        run_time = time.time() - start_time
         return test_output.TestOutput(
-            ''.join(output), self._output_image(), actual_checksum,
-            crash, time.time() - start_time, timeout, ''.join(error))
+            ''.join(output), self._output_image_with_retry(), actual_checksum,
+            crash, run_time, timeout, ''.join(error))
 
     def stop(self):
         if self._proc:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list