Title: [90422] trunk/Tools
Revision
90422
Author
[email protected]
Date
2011-07-05 17:33:13 -0700 (Tue, 05 Jul 2011)

Log Message

2011-07-05  Dirk Pranke  <[email protected]>

        Reviewed by Eric Seidel.

        Python tests are failing on leopard
        https://bugs.webkit.org/show_bug.cgi?id=63842

        Fix the missing flush() call that appears to be needed by the
        logging package in python 2.5. Also fix the regressions
        introduced in the run_webkit_test tests when we switched from
        thread to processes (since processes aren't available on 2.5).

        Also fix a missing "from __future__ import with_statement' in
        testfilehandler (unreviewed).

        * Scripts/webkitpy/layout_tests/layout_package/metered_stream.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
        * TestResultServer/handlers/testfilehandler.py:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (90421 => 90422)


--- trunk/Tools/ChangeLog	2011-07-06 00:31:57 UTC (rev 90421)
+++ trunk/Tools/ChangeLog	2011-07-06 00:33:13 UTC (rev 90422)
@@ -1,3 +1,22 @@
+2011-07-05  Dirk Pranke  <[email protected]>
+
+        Reviewed by Eric Seidel.
+
+        Python tests are failing on leopard
+        https://bugs.webkit.org/show_bug.cgi?id=63842
+
+        Fix the missing flush() call that appears to be needed by the
+        logging package in python 2.5. Also fix the regressions
+        introduced in the run_webkit_test tests when we switched from
+        thread to processes (since processes aren't available on 2.5).
+
+        Also fix a missing "from __future__ import with_statement' in
+        testfilehandler (unreviewed).
+
+        * Scripts/webkitpy/layout_tests/layout_package/metered_stream.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+        * TestResultServer/handlers/testfilehandler.py:
+
 2011-07-05  Eric Seidel  <[email protected]>
 
         Reviewed by Adam Barth.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/metered_stream.py (90421 => 90422)


--- trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/metered_stream.py	2011-07-06 00:31:57 UTC (rev 90421)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/metered_stream.py	2011-07-06 00:33:13 UTC (rev 90422)
@@ -66,6 +66,10 @@
         """Write a message that will be overwritten by subsequent update() or write() calls."""
         self._overwrite(txt)
 
+    def flush(self):
+        # This seems to be needed on Python 2.5 for some reason.
+        self._stream.flush()
+
     def _overwrite(self, txt):
         # Print the necessary number of backspaces to erase the previous
         # message.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (90421 => 90422)


--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py	2011-07-06 00:31:57 UTC (rev 90421)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py	2011-07-06 00:33:13 UTC (rev 90422)
@@ -49,6 +49,10 @@
 except ImportError:
     multiprocessing = None
 
+# 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')
+
 from webkitpy.common import array_stream
 from webkitpy.common.system import outputcapture
 from webkitpy.common.system import filesystem_mock
@@ -203,29 +207,26 @@
             self.assertTrue(len(batch) <= 2, '%s had too many tests' % ', '.join(batch))
 
     def test_child_process_1(self):
-        # This test seems to fail on win32.
-        if sys.platform == 'win32':
-            return
-        _, _, regular_output, _ = logging_run(
-             ['--print', 'config', '--worker-model', 'processes', '--child-processes', '1'])
-        self.assertTrue(any(['Running 1 ' in line for line in regular_output.get()]))
+        if SHOULD_TEST_PROCESSES:
+            _, _, regular_output, _ = logging_run(
+                ['--print', 'config', '--worker-model', 'processes', '--child-processes', '1'])
+            self.assertTrue(any(['Running 1 ' in line for line in regular_output.get()]))
 
     def test_child_processes_2(self):
         # This test seems to fail on win32.
         if sys.platform == 'win32':
             return
-        _, _, regular_output, _ = logging_run(
-             ['--print', 'config', '--worker-model', 'processes', '--child-processes', '2'])
-        self.assertTrue(any(['Running 2 ' in line for line in regular_output.get()]))
+        if SHOULD_TEST_PROCESSES:
+            _, _, regular_output, _ = logging_run(
+                ['--print', 'config', '--worker-model', 'processes', '--child-processes', '2'])
+            self.assertTrue(any(['Running 2 ' in line for line in regular_output.get()]))
 
     def test_child_processes_min(self):
-        # This test seems to fail on win32.
-        if sys.platform == 'win32':
-            return
-        _, _, regular_output, _ = logging_run(
-             ['--print', 'config', '--worker-model', 'processes', '--child-processes', '2', 'passes'],
-             tests_included=True)
-        self.assertTrue(any(['Running 1 ' in line for line in regular_output.get()]))
+        if SHOULD_TEST_PROCESSES:
+            _, _, regular_output, _ = logging_run(
+                ['--print', 'config', '--worker-model', 'processes', '--child-processes', '2', 'passes'],
+                tests_included=True)
+            self.assertTrue(any(['Running 1 ' in line for line in regular_output.get()]))
 
     def test_dryrun(self):
         batch_tests_run = get_tests_run(['--dry-run'])
@@ -611,13 +612,11 @@
         self.assertTrue('--worker-model=inline overrides --child-processes\n' in err.get())
 
     def test_worker_model__processes(self):
-        # FIXME: remove this when we fix test-webkitpy to work properly
-        # with the multiprocessing module (bug 54520).
-        if multiprocessing and sys.platform not in ('cygwin', 'win32'):
+        if SHOULD_TEST_PROCESSES:
             self.assertTrue(passing_run(['--worker-model', 'processes']))
 
     def test_worker_model__processes_and_dry_run(self):
-        if multiprocessing and sys.platform not in ('cygwin', 'win32'):
+        if SHOULD_TEST_PROCESSES:
             self.assertTrue(passing_run(['--worker-model', 'processes', '--dry-run']))
 
     def test_worker_model__unknown(self):

Modified: trunk/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py (90421 => 90422)


--- trunk/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py	2011-07-06 00:31:57 UTC (rev 90421)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py	2011-07-06 00:33:13 UTC (rev 90422)
@@ -26,6 +26,8 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+from __future__ import with_statement
+
 import BaseHTTPServer
 
 import codecs
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to