2011-06-10 Ryosuke Niwa <rniwa@webkit.org>
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Jun 2011 06:04:28 +0000 (06:04 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Jun 2011 06:04:28 +0000 (06:04 +0000)
        Reviewed by Ojan Vafai.

        new-run-webkit-tests: 'images' links on results.html don't work
        https://bugs.webkit.org/show_bug.cgi?id=62194

        Use relative path when generating images-diffs.html

        * Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py:
        Added _output_testname.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88598 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py

index 1cfeec3..a5e01d0 100644 (file)
@@ -1,3 +1,15 @@
+2011-06-10  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Ojan Vafai.
+
+        new-run-webkit-tests: 'images' links on results.html don't work
+        https://bugs.webkit.org/show_bug.cgi?id=62194
+
+        Use relative path when generating images-diffs.html
+
+        * Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py:
+        Added _output_testname.
+
 2011-06-10  Lucas Forschler  <lforschler@apple.com>
 
         Reviewed by Stephanie Lewis.
index 52ac3e9..5c27275 100644 (file)
@@ -132,6 +132,10 @@ class TestResultWriter(object):
         output_filename = fs.join(self._root_output_dir, self._testname)
         return fs.splitext(output_filename)[0] + modifier
 
+    def _output_testname(self, modifier):
+        fs = self._port._filesystem
+        return fs.splitext(fs.basename(self._testname))[0] + modifier
+
     def write_output_files(self, file_type, output, expected):
         """Writes the test output, the expected output in the results directory.
 
@@ -241,7 +245,7 @@ Difference between images: <a href="%(diff_filename)s">diff</a><br>
     toggleImages();
     setInterval(toggleImages, 2000)
 </script>
-""" % { 'title': self._testname, 'diff_filename': self.output_filename('-diff.png'), 'prefix': self.output_filename('') }
+""" % { 'title': self._testname, 'diff_filename': self._output_testname('-diff.png'), 'prefix': self._output_testname('') }
         self._port._filesystem.write_binary_file(diffs_html_filename, html)
 
         return True