Changeset 69075 in webkit


Ignore:
Timestamp:
Oct 4, 2010 10:26:30 PM (14 years ago)
Author:
tkent@chromium.org
Message:

2010-10-04 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r69066.
http://trac.webkit.org/changeset/69066
https://bugs.webkit.org/show_bug.cgi?id=47163

Made NRWT reliability worse. (Requested by tkent on #webkit).

  • Scripts/webkitpy/layout_tests/port/chromium.py:
  • Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r69074 r69075  
     12010-10-04  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r69066.
     4        http://trac.webkit.org/changeset/69066
     5        https://bugs.webkit.org/show_bug.cgi?id=47163
     6
     7        Made NRWT reliability worse. (Requested by tkent on #webkit).
     8
     9        * Scripts/webkitpy/layout_tests/port/chromium.py:
     10        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
     11
    1122010-10-04  Gabor Rapcsanyi  <rgabor@inf.u-szeged.hu>
    213
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py

    r69066 r69075  
    137137        expected_tmpfile = tempfile.NamedTemporaryFile()
    138138        expected_tmpfile.write(expected_contents)
    139         expected_tmpfile.flush()
    140139        actual_tmpfile = tempfile.NamedTemporaryFile()
    141140        actual_tmpfile.write(actual_contents)
    142         actual_tmpfile.flush()
    143141        if diff_filename:
    144142            cmd = [executable, '--diff', expected_tmpfile.name,
     
    149147        result = True
    150148        try:
    151             exit_code = self._executive.run_command(cmd, return_exit_code=True)
    152             if exit_code == 0:
    153                 # The images are the same.
    154                 result = False
    155             elif exit_code != 1:
    156                 # Some other error occurred.
    157                 raise ValueError("image diff returned an exit code of " +
    158                                  str(exit_code))
     149            if self._executive.run_command(cmd, return_exit_code=True) == 0:
     150                return False
    159151        except OSError, e:
    160152            if e.errno == errno.ENOENT or e.errno == errno.EACCES:
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py

    r69066 r69075  
    157157        self.assertTrue(port.default_configuration_called)
    158158
    159     def test_diff_image(self):
    160         class TestPort(ChromiumPortTest.TestLinuxPort):
    161             def _path_to_image_diff(self):
    162                 return "/path/to/image_diff"
    163 
    164         class EmptyOptions:
    165             use_drt = False
    166 
    167         class MockExecute:
    168             def __init__(self, result):
    169                 self._result = result
    170 
    171             def run_command(self,
    172                             args,
    173                             cwd=None,
    174                             input=None,
    175                             error_handler=None,
    176                             return_exit_code=False,
    177                             return_stderr=True,
    178                             decode_output=False):
    179                 return self._result
    180 
    181         options = EmptyOptions()
    182         port = ChromiumPortTest.TestLinuxPort(options)
    183 
    184         # Images are different.
    185         port._executive = MockExecute(0)
    186         self.assertEquals(False, port.diff_image("EXPECTED", "ACTUAL"))
    187 
    188         # Images are the same.
    189         port._executive = MockExecute(1)
    190         self.assertEquals(True, port.diff_image("EXPECTED", "ACTUAL"))
    191 
    192         # There was some error running image_diff.
    193         port._executive = MockExecute(2)
    194         exception_raised = False
    195         try:
    196             port.diff_image("EXPECTED", "ACTUAL")
    197         except ValueError, e:
    198             exception_raised = True
    199         self.assertTrue(exception_raised)
    200 
    201159if __name__ == '__main__':
    202160    unittest.main()
Note: See TracChangeset for help on using the changeset viewer.