Changeset 104524 in webkit
- Timestamp:
- Jan 9, 2012 5:32:54 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r104495 r104524 1 2012-01-09 Dirk Pranke <dpranke@chromium.org> 2 3 webkitpy.layout_tests.port.mock_drt_unittest.MockChromiumDRTTest has been failing on cr-win 4 https://bugs.webkit.org/show_bug.cgi?id=75884 5 6 Reviewed by Ryosuke Niwa. 7 8 Fix regression introduced (revealed?) in r104340. Chromium file 9 url syntax is different on win32 and the test results weren't 10 expecting that. 11 12 * Scripts/webkitpy/layout_tests/models/test_expectations.py: 13 (TestExpectations._report_errors): 14 * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: 15 (test_parse_error_nonfatal): 16 * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py: 17 (MockDRTTest.input_line): 18 (MockChromiumDRTTest.test_pixeltest__fails): 19 * Scripts/webkitpy/layout_tests/port/test.py: 20 * Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py: 21 (TestRebaseliner.make_rebaseliner): 22 (TestRebaseliner.test_one_platform): 23 (TestRebaseliner.test_all_platforms): 24 (TestRebaseliner.test_png_file_with_comment): 25 (TestRebaseliner.test_png_file_with_comment_remove_old_checksum): 26 (TestRebaseliner.test_png_file_with_comment_as_duplicate): 27 (TestRealMain.test_all_platforms): 28 1 29 2012-01-09 Dirk Pranke <dpranke@chromium.org> 2 30 -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
r101979 r104524 790 790 791 791 if len(errors) or len(warnings): 792 webkit_base_path = self._port.webkit_base()793 792 test_expectation_path = self._port.path_to_test_expectations_file() 794 test_expectation_relative_path = test_expectation_path[len(webkit_base_path):].lstrip('/') 795 failure_title = "FAILURES FOR %s in %s" % (str(self._test_config), test_expectation_relative_path) 793 failure_title = "FAILURES FOR %s in %s" % (str(self._test_config), test_expectation_path) 796 794 _log.error(failure_title) 797 795 -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
r103357 r104524 200 200 except ParseError, e: 201 201 self.assertTrue(e.fatal) 202 exp_errors = [u"FAILURES FOR %s in LayoutTests/platform/test/test_expectations.txt" % self._port.test_configuration(),202 exp_errors = [u"FAILURES FOR %s in %s" % (self._port.test_configuration(), self._port.path_to_test_expectations_file()), 203 203 u"Line:1 Unrecognized modifier 'foo' failures/expected/text.html", 204 204 u"Line:2 Missing expectations SKIP : failures/expected/image.html"] … … 213 213 except ParseError, e: 214 214 self.assertFalse(e.fatal) 215 exp_errors = [u'FAILURES FOR %s in LayoutTests/platform/test/test_expectations.txt' % self._port.test_configuration(),215 exp_errors = [u'FAILURES FOR %s in %s' % (self._port.test_configuration(), self._port.path_to_test_expectations_file()), 216 216 u'Line:1 Test lacks BUG modifier. failures/expected/text.html'] 217 217 self.assertEqual(str(e), '\n'.join(map(str, exp_errors))) -
trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
r104416 r104524 91 91 def input_line(self, port, test_name, checksum=None): 92 92 url = port.create_driver(0).test_to_uri(test_name) 93 # FIXME: we shouldn't have to work around platform-specific issues 94 # here. 95 if url.startswith('file:////'): 96 url = url[len('file:////') - 1:] 97 if url.startswith('file:///'): 98 url = url[len('file:///') - 1:] 93 if url.startswith('file://'): 94 if sys.platform == 'win32': 95 url = url[len('file:///'):] 96 else: 97 url = url[len('file://'):] 99 98 100 99 if checksum: … … 237 236 def test_pixeltest__fails(self): 238 237 host = MockHost() 238 url = '#URL:file://%s/failures/expected/checksum.html' % host.port_factory.get('test').layout_tests_dir() 239 239 self.assertTest('failures/expected/checksum.html', pixel_tests=True, 240 240 expected_checksum='wrong-checksum', 241 drt_output=[ '#URL:file:///test.checkout/LayoutTests/failures/expected/checksum.html\n',241 drt_output=[url + '\n', 242 242 '#MD5:checksum-checksum\n', 243 243 'checksum-txt', -
trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py
r104340 r104524 32 32 33 33 import base64 34 import sys 34 35 import time 35 36 … … 221 222 # related to this before. 222 223 223 LAYOUT_TEST_DIR = '/test.checkout/LayoutTests' 224 if sys.platform == 'win32': 225 LAYOUT_TEST_DIR = 'c:/test.checkout/LayoutTests' 226 else: 227 LAYOUT_TEST_DIR = '/test.checkout/LayoutTests' 224 228 225 229 -
trunk/Tools/Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py
r104416 r104524 196 196 197 197 # FIXME: SCM module doesn't handle paths that aren't relative to the checkout_root consistently. 198 filesystem.chdir( "/test.checkout")198 filesystem.chdir(filesystem.dirname(host_port_obj.layout_tests_dir())) 199 199 200 200 rebaseliner = rebaseline_chromium_webkit_tests.Rebaseliner(host, host_port_obj, … … 228 228 229 229 rebaseliner.run() 230 layout_test_dir = rebaseliner._port.layout_tests_dir() 230 231 # We expect to have written 13 files over the course of this rebaseline: 231 232 # *) 3 files in /__im_tmp for the extracted archive members 232 # *) 3 new baselines under '/test.checkout/LayoutTests'233 # *) 3 new baselines under layout_test_dir 233 234 # *) 4 files in /tmp for the new and old baselines in the result file 234 235 # (-{old,new}.{txt,png} … … 237 238 # *) 1 updated test_expectations file 238 239 self.assertEqual(len(filesystem.written_files), 13) 239 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.checksum'], 'new-image-checksum')240 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.png'], 'new-image-png')241 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.txt'], 'new-image-txt')240 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.checksum'], 'new-image-checksum') 241 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.png'], 'new-image-png') 242 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.txt'], 'new-image-txt') 242 243 243 244 def test_all_platforms(self): 244 245 rebaseliner, filesystem = self.make_rebaseliner( 245 246 "BUGX REBASELINE : failures/expected/image.html = IMAGE") 247 layout_test_dir = rebaseliner._port.layout_tests_dir() 246 248 rebaseliner.run() 247 249 # See comment in test_one_platform for an explanation of the 13 written tests. … … 249 251 # rebaseliner only ever does one. 250 252 self.assertEqual(len(filesystem.written_files), 13) 251 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.checksum'], 'new-image-checksum')252 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.png'], 'new-image-png')253 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image-expected.txt'], 'new-image-txt')253 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.checksum'], 'new-image-checksum') 254 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.png'], 'new-image-png') 255 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image-expected.txt'], 'new-image-txt') 254 256 255 257 def test_png_file_with_comment(self): 256 258 rebaseliner, filesystem = self.make_rebaseliner( 257 259 "BUGX REBASELINE MAC : failures/expected/image_checksum.html = IMAGE") 260 layout_test_dir = rebaseliner._port.layout_tests_dir() 258 261 compile_success = rebaseliner._compile_rebaselining_tests() 259 262 self.assertTrue(compile_success) … … 263 266 # write 2 expectations (the png and the txt file). 264 267 self.assertEqual(len(filesystem.written_files), 12) 265 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'], 'tEXtchecksum\x000123456789')266 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'], 'png-comment-txt')267 self.assertFalse(filesystem.files.get( '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None))268 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'], 'tEXtchecksum\x000123456789') 269 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'], 'png-comment-txt') 270 self.assertFalse(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None)) 268 271 269 272 def test_png_file_with_comment_remove_old_checksum(self): 270 273 rebaseliner, filesystem = self.make_rebaseliner( 271 274 "BUGX REBASELINE MAC : failures/expected/image_checksum.html = IMAGE") 272 filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'] = 'old' 273 filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum'] = 'old' 274 filesystem.files['/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'] = 'old' 275 layout_test_dir = rebaseliner._port.layout_tests_dir() 276 filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'] = 'old' 277 filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum'] = 'old' 278 filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'] = 'old' 275 279 276 280 compile_success = rebaseliner._compile_rebaselining_tests() … … 281 285 # because we also delete the old checksum. 282 286 self.assertEqual(len(filesystem.written_files), 13) 283 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'], 'tEXtchecksum\x000123456789')284 self.assertEqual(filesystem.files[ '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'], 'png-comment-txt')285 self.assertEqual(filesystem.files.get( '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None)287 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.png'], 'tEXtchecksum\x000123456789') 288 self.assertEqual(filesystem.files[layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt'], 'png-comment-txt') 289 self.assertEqual(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None) 286 290 287 291 def test_png_file_with_comment_as_duplicate(self): 288 292 rebaseliner, filesystem = self.make_rebaseliner( 289 293 "BUGX REBASELINE MAC : failures/expected/image_checksum.html = IMAGE") 290 filesystem.files['/test.checkout/LayoutTests/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.png'] = 'tEXtchecksum\x000123456789' 291 filesystem.files['/test.checkout/LayoutTests/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.txt'] = 'png-comment-txt' 294 layout_test_dir = rebaseliner._port.layout_tests_dir() 295 filesystem.files[layout_test_dir + '/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.png'] = 'tEXtchecksum\x000123456789' 296 filesystem.files[layout_test_dir + '/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.txt'] = 'png-comment-txt' 292 297 293 298 compile_success = rebaseliner._compile_rebaselining_tests() … … 295 300 self.assertEqual(set(['failures/expected/image_checksum.html']), rebaseliner._rebaselining_tests) 296 301 rebaseliner.run() 297 self.assertEqual(filesystem.files.get( '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.png', None), None)298 self.assertEqual(filesystem.files.get( '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt', None), None)299 self.assertEqual(filesystem.files.get( '/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None)302 self.assertEqual(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.png', None), None) 303 self.assertEqual(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt', None), None) 304 self.assertEqual(filesystem.files.get(layout_test_dir + '/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None) 300 305 301 306 def test_diff_baselines_txt(self): … … 332 337 333 338 # FIXME: SCM module doesn't handle paths that aren't relative to the checkout_root consistently. 334 filesystem.chdir( "/test.checkout")339 filesystem.chdir(filesystem.dirname(host_port_obj.layout_tests_dir())) 335 340 336 341 oc = outputcapture.OutputCapture()
Note: See TracChangeset
for help on using the changeset viewer.