2011-04-18 Sheriff Bot <webkit.review.bot@gmail.com>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2011 09:47:50 +0000 (09:47 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2011 09:47:50 +0000 (09:47 +0000)
        Unreviewed, rolling out r84111.
        http://trac.webkit.org/changeset/84111
        https://bugs.webkit.org/show_bug.cgi?id=58771

        Chromium linux layout tests are broken. (Requested by loislo2
        on #webkit).

        * Scripts/webkitpy/layout_tests/port/chromium.py:
        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
        * Scripts/webkitpy/layout_tests/port/mock_drt.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84128 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/chromium.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py

index 667fdf1f6d6e75132b1e61f6f64254a5ceafae4f..3c8bef4f874bfc50021b4d6cd8de6263286ec059 100644 (file)
@@ -1,3 +1,16 @@
+2011-04-18  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r84111.
+        http://trac.webkit.org/changeset/84111
+        https://bugs.webkit.org/show_bug.cgi?id=58771
+
+        Chromium linux layout tests are broken. (Requested by loislo2
+        on #webkit).
+
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+        * Scripts/webkitpy/layout_tests/port/mock_drt.py:
+
 2011-04-18  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r84112.
index f7472219814496239a5c6d4f831f6a9d45f16453..eb10a9bd14d88c3a16a5fa8318493fcb02020b93 100644 (file)
@@ -357,7 +357,6 @@ class ChromiumDriver(base.Driver):
         if self._port.get_option('pixel_tests'):
             self._image_path = self._port._filesystem.join(self._port.results_directory(),
                 'png_result%s.png' % self._worker_number)
-        self._stderr_is_nonblocking = False
 
     def cmd_line(self):
         cmd = self._command_wrapper(self._port.get_option('wrapper'))
@@ -404,9 +403,8 @@ class ChromiumDriver(base.Driver):
         close_flag = sys.platform not in ('win32', 'cygwin')
         self._proc = subprocess.Popen(cmd, stdin=subprocess.PIPE,
                                       stdout=subprocess.PIPE,
-                                      stderr=subprocess.PIPE,
+                                      stderr=subprocess.STDOUT,
                                       close_fds=close_flag)
-        self._stderr_is_nonblocking = False
 
     def poll(self):
         # poll() is not threadsafe and can throw OSError due to:
@@ -517,7 +515,7 @@ class ChromiumDriver(base.Driver):
             elif actual_uri:
                 output.append(line)
             else:
-                error.append('extra stdout output: %s' % line)
+                error.append(line)
 
             (line, crash) = self._write_command_and_read_line(input=None)
 
@@ -528,10 +526,9 @@ class ChromiumDriver(base.Driver):
         text = ''.join(output)
         if not text:
             text = None
-        error_text = ''.join(error) + self._read_stderr()
 
         return base.DriverOutput(text, output_image, actual_checksum, audio=None,
-            crash=crash, test_time=run_time, timeout=timeout, error=error_text)
+            crash=crash, test_time=run_time, timeout=timeout, error=''.join(error))
 
     def stop(self):
         if self._proc:
@@ -555,24 +552,3 @@ class ChromiumDriver(base.Driver):
             if self._proc.poll() is not None:
                 self._proc.wait()
             self._proc = None
-
-    def _read_stderr(self):
-        if sys.platform in ('win32', 'cygwin'):
-            import msvcrt
-            import win32pipe
-
-            fd = self._proc.stderr.fileno()
-            osf = msvcrt.get_osfhandle(fd)
-            _, avail, _ = win32pipe.PeekNamedPipe(osf, 0)
-            if avail:
-                return self._proc.stderr.read(avail)
-            return ''
-        else:
-            if not self._stderr_is_nonblocking:
-                import fcntl
-                import os
-                fd = self._proc.stderr.fileno()
-                fl = fcntl.fcntl(fd, fcntl.F_GETFL)
-                fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
-                self._stderr_is_nonblocking = True
-            return self._proc.stderr.read()
index e1b631175584d904386eada17575e024bb0db9a5..0260dffd7fb510eac058a00d55972d46911531fe 100644 (file)
@@ -41,8 +41,6 @@ import chromium_linux
 import chromium_mac
 import chromium_win
 
-from webkitpy.layout_tests.port import base
-from webkitpy.layout_tests.port import factory
 from webkitpy.layout_tests.port import port_testcase
 
 
@@ -222,22 +220,6 @@ LINUX WIN : fast/js/very-good.js = TIMEOUT PASS"""
             exception_raised = True
         self.assertFalse(exception_raised)
 
-    # Disabled because this is an integration test that relies on the
-    # actual filesystem.
-    def disabled_test_stderr(self):
-        port = factory.get('mock-chromium-mac-snowleopard')
-        path = port.abspath_for_test('fast/html/article-element.html')
-        self.assertTrue(port._filesystem.exists(path))
-
-        driver = port.create_driver(1)
-        driver.start()
-        try:
-            driver_input = base.DriverInput(path, 1000, None)
-            driver_output = driver.run_test(driver_input)
-            self.assertEquals(driver_output.error.strip(), 'stuff going to stderr')
-        finally:
-            driver.stop()
-
 
 class ChromiumPortLoggingTest(logtesting.LoggingTestCase):
     def test_check_sys_deps(self):
index d638277446e284b4a2dc503475e4920cbb77798a..73967cfbff8657add7563c47dfa324aa2cb52773 100644 (file)
@@ -283,13 +283,6 @@ class MockChromiumDRT(MockDRT):
         self._stdout.write('#EOF\n')
         self._stdout.flush()
 
-        # FIXME: this is a lame hack to test that we are capturing stderr
-        # output correctly. We should fix this by passing in a command line
-        # arg once https://bugs.webkit.org/show_bug.cgi?id=58680 lands.
-        if 'article-element' in test_input.uri:
-            self._stderr.write("stuff going to stderr\n")
-            self._stderr.flush()
-
 
 if __name__ == '__main__':
     fs = filesystem.FileSystem()