Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1034)

Unified Diff: sky/tools/webkitpy/layout_tests/controllers/single_test_runner.py

Issue 802573002: Prepare python code for reftests. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/tools/webkitpy/layout_tests/controllers/single_test_runner.py
diff --git a/sky/tools/webkitpy/layout_tests/controllers/single_test_runner.py b/sky/tools/webkitpy/layout_tests/controllers/single_test_runner.py
index a8ca9739aedadc3597a2efd187c3906c4897abeb..31d4d8cda39c0e193506d672bb864387f8e2a25d 100644
--- a/sky/tools/webkitpy/layout_tests/controllers/single_test_runner.py
+++ b/sky/tools/webkitpy/layout_tests/controllers/single_test_runner.py
@@ -71,7 +71,7 @@ class SingleTestRunner(object):
if self._reference_files:
# Detect and report a test which has a wrong combination of expectation files.
- # For example, if 'foo.html' has two expectation files, 'foo-expected.html' and
+ # For example, if 'foo.html' has two expectation files, 'foo-expected.sky' and
# 'foo-expected.txt', we should warn users. One test file must be used exclusively
# in either layout tests or reftests, but not in both.
for suffix in ('.txt', '.png', '.wav'):
@@ -402,22 +402,17 @@ class SingleTestRunner(object):
if not reference_driver_output.image_hash and not actual_driver_output.image_hash:
failures.append(test_failures.FailureReftestNoImagesGenerated(reference_filename))
elif mismatch:
- if reference_driver_output.image_hash == actual_driver_output.image_hash:
- diff, err_str = self._port.diff_image(reference_driver_output.image, actual_driver_output.image)
- if not diff:
- failures.append(test_failures.FailureReftestMismatchDidNotOccur(reference_filename))
- elif err_str:
- _log.error(err_str)
- else:
- _log.warning(" %s -> ref test hashes matched but diff failed" % self._test_name)
+ diff, err_str = self._port.diff_image(reference_driver_output.image, actual_driver_output.image)
+ if not diff:
+ failures.append(test_failures.FailureReftestMismatchDidNotOccur(reference_filename))
+ elif err_str:
+ _log.error(err_str)
- elif reference_driver_output.image_hash != actual_driver_output.image_hash:
+ else:
diff, err_str = self._port.diff_image(reference_driver_output.image, actual_driver_output.image)
if diff:
failures.append(test_failures.FailureReftestMismatch(reference_filename))
elif err_str:
_log.error(err_str)
- else:
- _log.warning(" %s -> ref test hashes didn't match but diff passed" % self._test_name)
return TestResult(self._test_name, failures, total_test_time, has_stderr, pid=actual_driver_output.pid)
« no previous file with comments | « sky/tests/resources/results.html ('k') | sky/tools/webkitpy/layout_tests/controllers/test_result_writer_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698