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

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

Issue 2237083002: In rebaseline-cl: add option to only rebaseline tests changed in the CL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py
index 88e4494556c1722e4fc52b0e81912bb7ee319d33..627d6982eb5771bca18ed4c2fd9918c0d4b879b9 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py
@@ -34,6 +34,10 @@ class RebaselineCLTest(BaseTestCase):
'buildnumber': 4000,
},
],
+ 'files': {
+ 'third_party/WebKit/LayoutTests/fast/dom/prototype-inheritance.html': {'status': 'M'},
+ 'third_party/WebKit/LayoutTests/fast/dom/prototype-taco.html': {'status': 'M'},
+ },
}),
})
self.tool.builders = BuilderList({
@@ -55,11 +59,12 @@ class RebaselineCLTest(BaseTestCase):
@staticmethod
def command_options(**kwargs):
options = {
- 'issue': None,
+ 'only_changed_tests': False,
'dry_run': False,
+ 'issue': None,
'optimize': True,
- 'verbose': False,
'results_directory': None,
+ 'verbose': False,
}
options.update(kwargs)
return optparse.Values(dict(**options))
@@ -108,6 +113,24 @@ class RebaselineCLTest(BaseTestCase):
'Rebaselining fast/dom/prototype-taco.html\n'
'Rebaselining svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html\n'))
+ def test_execute_with_only_changed_tests_option(self):
+ oc = OutputCapture()
+ try:
+ oc.capture_output()
+ self.command.execute(self.command_options(issue=11112222, only_changed_tests=True), [], self.tool)
+ finally:
+ _, _, logs = oc.restore_output()
+ # svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html
+ # is in the list of failed tests, but not in the list of files modified
+ # in the given CL; it should be included because all_tests is set to True.
+ self.assertMultiLineEqual(
+ logs,
+ ('Tests to rebaseline:\n'
+ ' fast/dom/prototype-inheritance.html: MOCK Try Win (5000)\n'
+ ' fast/dom/prototype-taco.html: MOCK Try Win (5000)\n'
+ 'Rebaselining fast/dom/prototype-inheritance.html\n'
+ 'Rebaselining fast/dom/prototype-taco.html\n'))
+
def test_rebaseline_calls(self):
"""Tests the list of commands that are invoked when rebaseline is called."""
# First write test contents to the mock filesystem so that
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698