Changeset 69075 in webkit
- Timestamp:
- Oct 4, 2010 10:26:30 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r69074 r69075 1 2010-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 1 12 2010-10-04 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu> 2 13 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
r69066 r69075 137 137 expected_tmpfile = tempfile.NamedTemporaryFile() 138 138 expected_tmpfile.write(expected_contents) 139 expected_tmpfile.flush()140 139 actual_tmpfile = tempfile.NamedTemporaryFile() 141 140 actual_tmpfile.write(actual_contents) 142 actual_tmpfile.flush()143 141 if diff_filename: 144 142 cmd = [executable, '--diff', expected_tmpfile.name, … … 149 147 result = True 150 148 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 159 151 except OSError, e: 160 152 if e.errno == errno.ENOENT or e.errno == errno.EACCES: -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
r69066 r69075 157 157 self.assertTrue(port.default_configuration_called) 158 158 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 = False166 167 class MockExecute:168 def __init__(self, result):169 self._result = result170 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._result180 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 = False195 try:196 port.diff_image("EXPECTED", "ACTUAL")197 except ValueError, e:198 exception_raised = True199 self.assertTrue(exception_raised)200 201 159 if __name__ == '__main__': 202 160 unittest.main()
Note: See TracChangeset
for help on using the changeset viewer.