[Webkit-unassigned] [Bug 36725] test-webkitpy: Eliminate spurious output

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 28 12:00:06 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=36725





--- Comment #3 from Chris Jerdonek <cjerdonek at webkit.org>  2010-03-28 12:00:05 PST ---
(In reply to comment #2)
> Is it possible it's related to the ordering of the tests (if some code shuts
> off rendering to the screen)? The ordering probably changed with the unit test
> auto-detection that was landed yesterday:
> 
> https://bugs.webkit.org/show_bug.cgi?id=36591

I looked into it, and yes, it's because of what I guessed above.

It turns out there is a bug in deprecated_logging_unittest.py that is shutting
off sys.stderr:

class LoggingTest(unittest.TestCase):

    def assert_log_equals(self, log_input, expected_output):
        original_stderr = sys.stderr
        test_stderr = StringIO.StringIO()
        sys.stderr = test_stderr

        try:
            log(log_input)
            actual_output = test_stderr.getvalue()
        finally:
-->         original_stderr = original_stderr (should be sys.stderr =
original_stderr)

http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/system/deprecated_logging_unittest.py#L49

Before r56671, this test occurred towards the beginning.  But after r56671,
this test occurred later -- unmasking the output.

Fixing this bug will cause the spurious output to remain.  (Actually, it will
increase the spurious output slightly from another test or two.)  So the fix is
still to replace deprecated_logging with Python's logging module.

test-webkitpy already has logic to filter out log messages from webkitpy so
they don't get displayed to the screen (and without interfering with the unit
tests' ability to test logging).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list