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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py

Issue 2409903002: When rebaselining testharness tests with new all-PASS results, remove the baseline. (Closed)
Patch Set: Undo docstrings that no longer apply Created 4 years, 2 months 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: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index 00a8d8682d37b7a02b136b3c8270f5f82ea481ae..cd080acc1996324b05bbefe9d1e30c3a01c61694 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -36,6 +36,7 @@ import traceback
from webkitpy.common.memoized import memoized
from webkitpy.common.net.buildbot import Build
from webkitpy.common.system.executive import ScriptError
+from webkitpy.layout_tests.models.testharness_results import is_all_pass_testharness_result
from webkitpy.layout_tests.models.test_expectations import TestExpectations, BASELINE_SUFFIX_LIST, SKIP
from webkitpy.layout_tests.port import factory
from webkitpy.tool.commands.command import Command
@@ -222,6 +223,13 @@ class RebaselineTest(BaseInternalRebaselineCommand):
return
filesystem = self._tool.filesystem
+ if is_all_pass_testharness_result(data):
+ _log.debug("The new baseline is a passing testharness result with "
+ "no console warnings or errors, so it will not be saved.")
+ if filesystem.exists(target_baseline):
+ filesystem.remove(target_baseline)
+ return
+
filesystem.maybe_make_directory(filesystem.dirname(target_baseline))
filesystem.write_binary_file(target_baseline, data)

Powered by Google App Engine
This is Rietveld 408576698