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

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

Issue 2271463002: Change rebaseline-cl command to trigger any necessary try jobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: should -> will 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
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 3fdf58b71f11658c32c8cae0fada646afc76206b..e9486ddc6017f87fce8b0efb600920dd83598af0 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
@@ -47,7 +47,7 @@ class RebaselineCLTest(BaseTestCase):
"specifiers": ["Win7", "Release"],
"is_try_builder": True,
},
- "MOCK Try Mac": {
+ "MOCK Try Linux": {
"port_name": "test-mac-mac10.10",
"specifiers": ["Mac10.10", "Release"],
"is_try_builder": True,
@@ -67,6 +67,7 @@ class RebaselineCLTest(BaseTestCase):
'optimize': True,
'results_directory': None,
'verbose': False,
+ 'trigger_jobs': False,
}
options.update(kwargs)
return optparse.Values(dict(**options))
@@ -133,6 +134,39 @@ class RebaselineCLTest(BaseTestCase):
'Rebaselining fast/dom/prototype-inheritance.html\n'
'Rebaselining fast/dom/prototype-taco.html\n'))
+ def test_execute_with_trigger_jobs_option(self):
+ oc = OutputCapture()
+ try:
+ oc.capture_output()
+ self.command.execute(self.command_options(issue=11112222, trigger_jobs=True), [], self.tool)
+ finally:
+ _, _, logs = oc.restore_output()
+ # A message is printed showing that some try jobs are triggered.
+ self.assertMultiLineEqual(
+ logs,
+ ('Triggering try jobs for: MOCK Try Linux\n'
+ 'Tests to rebaseline:\n'
+ ' svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html: MOCK Try Win (5000)\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'
+ 'Rebaselining svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html\n'))
+ # The first executive call, before the rebaseline calls, is triggering try jobs.
+ self.assertEqual(
+ self.tool.executive.calls,
+ [
+ ['git', 'cl', 'try', '-b', 'MOCK Try Linux'],
+ [
+ ['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suffixes', 'png',
+ 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html'],
+ ['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suffixes', 'txt',
+ 'fast/dom/prototype-inheritance.html'],
+ ['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suffixes', 'txt',
+ 'fast/dom/prototype-taco.html']
+ ]
+ ])
+
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

Powered by Google App Engine
This is Rietveld 408576698