Changeset 82892 in webkit
- Timestamp:
- Apr 4, 2011 4:31:00 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r82885 r82892 1 2011-04-04 Tony Chang <tony@chromium.org> 2 3 Reviewed by Ojan Vafai. 4 5 [chromium] don't write .checksum files if a fallback platform has an embedded checksum 6 https://bugs.webkit.org/show_bug.cgi?id=57783 7 8 * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py: 9 * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py: 10 1 11 2011-04-04 Kevin Ollivier <kevino@theolliviers.com> 2 12 -
trunk/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
r82816 r82892 392 392 continue 393 393 394 if suffix == '.checksum' and self._png_has_same_checksum(temp_name, expected_fullpath): 394 if suffix == '.checksum' and self._png_has_same_checksum(temp_name, test, expected_fullpath): 395 self._filesystem.remove(temp_name) 395 396 # If an old checksum exists, delete it. 396 397 self._delete_baseline(expected_fullpath) … … 424 425 return temp_name 425 426 426 def _png_has_same_checksum(self, checksum_path, checksum_expected_fullpath):427 """Returns True if the png file next to|checksum_expected_fullpath|427 def _png_has_same_checksum(self, checksum_path, test, checksum_expected_fullpath): 428 """Returns True if the fallback png for |checksum_expected_fullpath| 428 429 contains the same checksum.""" 429 430 fs = self._filesystem 430 png_fullpath = fs.splitext(checksum_expected_fullpath)[0] + '.png' 431 png_fullpath = self._first_fallback_png_for_test(test) 432 431 433 if not fs.exists(png_fullpath): 432 434 _log.error(' Checksum without png file found! Expected %s to exist.' % png_fullpath) … … 442 444 return checksum_in_text_file == checksum_in_png 443 445 446 def _first_fallback_png_for_test(self, test): 447 test_filepath = self._filesystem.join(self._target_port.layout_tests_dir(), test) 448 all_baselines = self._rebaseline_port.expected_baselines( 449 test_filepath, '.png', True) 450 return self._filesystem.join(all_baselines[0][0], all_baselines[0][1]) 451 444 452 def _is_dup_baseline(self, new_baseline, baseline_path, test, suffix, platform): 445 453 """Check whether a baseline is duplicate and can fallback to same … … 449 457 450 458 Args: 451 expected_filename: baseline expectation file name. 459 new_baseline: temp filename containing the new baseline results 460 baseline_path: baseline expectation file name. 452 461 test: test name. 453 462 suffix: file suffix of the expected results, including dot; -
trunk/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py
r82705 r82892 289 289 self.assertEqual(filesystem.files.get('/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None) 290 290 291 def test_png_file_with_comment_as_duplicate(self): 292 rebaseliner, filesystem = self.make_rebaseliner( 293 "BUGX REBASELINE MAC : failures/expected/image_checksum.html = IMAGE") 294 filesystem.files['/test.checkout/LayoutTests/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.png'] = 'tEXtchecksum\x000123456789' 295 filesystem.files['/test.checkout/LayoutTests/platform/test-mac-snowleopard/failures/expected/image_checksum-expected.txt'] = 'png-comment-txt' 296 297 compile_success = rebaseliner._compile_rebaselining_tests() 298 self.assertTrue(compile_success) 299 self.assertEqual(set(['failures/expected/image_checksum.html']), rebaseliner._rebaselining_tests) 300 rebaseliner.run() 301 self.assertEqual(filesystem.files.get('/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.png', None), None) 302 self.assertEqual(filesystem.files.get('/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.txt', None), None) 303 self.assertEqual(filesystem.files.get('/test.checkout/LayoutTests/platform/test-mac-leopard/failures/expected/image_checksum-expected.checksum', None), None) 304 291 305 def test_diff_baselines_txt(self): 292 306 rebaseliner, filesystem = self.make_rebaseliner("")
Note: See TracChangeset
for help on using the changeset viewer.