file before trying to open it (as the tests do for results.html).
* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter.write_image_diff_files):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172370
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2014-08-08 Simon Fraser <simon.fraser@apple.com>
+ Unbreak webkitpy unit tests by checking for the existence of the image diff template
+ file before trying to open it (as the tests do for results.html).
+
+ * Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
+ (TestResultWriter.write_image_diff_files):
+
+2014-08-08 Simon Fraser <simon.fraser@apple.com>
+
Load the layout test result image diff HTML from a file, rather than having it inline in webkitpy
https://bugs.webkit.org/show_bug.cgi?id=135780
self._write_binary_file(diff_filename, image_diff)
base_dir = self._port.path_from_webkit_base('LayoutTests', 'fast', 'harness')
- image_diff_file = self._filesystem.read_text_file(self._filesystem.join(base_dir, 'image-diff-template.html'))
+
+ image_diff_template = self._filesystem.join(base_dir, 'image-diff-template.html');
+ image_diff_file = ""
+ if self._filesystem.exists(image_diff_template):
+ image_diff_file = self._filesystem.read_text_file(image_diff_template)
# FIXME: old-run-webkit-tests shows the diff percentage as the text contents of the "diff" link.
# FIXME: old-run-webkit-tests include a link to the test file.