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

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

Issue 2397573002: Don't track SCM changes in rebaseline commands. (Closed)
Patch Set: Update message and docstring for has_working_directory_changes 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_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index 59d3c6f3bfcba8603e5996a7cfbb5ad723505f53..a71193b71995eeb014ca8c83fe9812ba0625c143 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -12,7 +12,7 @@ from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.layout_tests.builder_list import BuilderList
from webkitpy.tool.commands.rebaseline import (
AbstractParallelRebaselineCommand, CopyExistingBaselinesInternal,
- Rebaseline, RebaselineExpectations, RebaselineJson, RebaselineTest, ChangeSet
+ Rebaseline, RebaselineExpectations, RebaselineJson, RebaselineTest
)
from webkitpy.tool.mock_tool import MockWebKitPatch
@@ -149,6 +149,9 @@ class TestCopyExistingBaselinesInternal(BaseTestCase):
'platform/test-mac-mac10.10/failures/expected/image-expected.txt')),
'original mac10.11 result')
+ def test_copying_overwritten_baseline_to_multiple_locations(self):
+ self.tool.executive = MockExecutive2()
+
def test_copy_baseline_win7_to_linux_trusty(self):
port = self.tool.port_factory.get('test-win-win7')
self._write(
@@ -293,22 +296,7 @@ class TestRebaselineTest(BaseTestCase):
OutputCapture().assert_outputs(
self, self.command._rebaseline_test_and_update_expectations, args=[self.options(suffixes='png')],
expected_logs="Cannot rebaseline image result for reftest: userscripts/another-test.html\n")
- self.assertDictEqual(self.command._scm_changes.to_dict(), {'add': [], 'remove-lines': [], "delete": []})
-
- def test_rebaseline_test_and_print_scm_changes(self):
- self.command._print_scm_changes = True
- self.command._scm_changes = ChangeSet()
- self.tool._scm.exists = lambda x: False
-
- self.command._rebaseline_test("MOCK Trusty", "userscripts/another-test.html", "txt", None)
-
- self.assertDictEqual(
- self.command._scm_changes.to_dict(),
- {
- 'add': ['/test.checkout/LayoutTests/platform/test-linux-trusty/userscripts/another-test-expected.txt'],
- 'delete': [],
- 'remove-lines': []
- })
+ self.assertDictEqual(self.command.expectation_line_changes.to_dict(), {'remove-lines': []})
def test_rebaseline_test_internal_with_port_that_lacks_buildbot(self):
self.tool.executive = MockExecutive2()
@@ -344,7 +332,7 @@ class TestRebaselineTest(BaseTestCase):
self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(
port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/image-expected.txt')))
self.assertMultiLineEqual(
- out, '{"add": [], "remove-lines": [{"test": "failures/expected/image.html", "builder": "MOCK Win10"}], "delete": []}\n')
+ out, '{"remove-lines": [{"test": "failures/expected/image.html", "builder": "MOCK Win10"}]}\n')
class TestAbstractParallelRebaselineCommand(BaseTestCase):
@@ -408,7 +396,7 @@ class TestRebaselineJson(BaseTestCase):
'--builder', 'MOCK Win7', '--test', 'userscripts/first-test.html', '--verbose']],
[['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt,png',
'--builder', 'MOCK Win7', '--test', 'userscripts/first-test.html', '--verbose']],
- [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suffixes', 'txt,png',
+ [['python', 'echo', 'optimize-baselines', '--suffixes', 'txt,png',
'userscripts/first-test.html', '--verbose']]
])
@@ -426,7 +414,7 @@ class TestRebaselineJson(BaseTestCase):
'--builder', 'MOCK Win7 (dbg)', '--test', 'userscripts/first-test.html', '--verbose']],
[['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt,png', '--builder',
'MOCK Win7 (dbg)', '--test', 'userscripts/first-test.html', '--verbose']],
- [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suffixes', 'txt,png',
+ [['python', 'echo', 'optimize-baselines', '--suffixes', 'txt,png',
'userscripts/first-test.html', '--verbose']]
])
@@ -906,7 +894,7 @@ class MockLineRemovingExecutive(MockExecutive):
for cmd_line, cwd in commands:
out = self.run_command(cmd_line, cwd=cwd)
if 'rebaseline-test-internal' in cmd_line:
- out = '{"add": [], "remove-lines": [{"test": "%s", "builder": "%s"}], "delete": []}\n' % (cmd_line[8], cmd_line[6])
+ out = '{"remove-lines": [{"test": "%s", "builder": "%s"}]}\n' % (cmd_line[8], cmd_line[6])
command_outputs.append([0, out, ''])
new_calls = self.calls[num_previous_calls:]

Powered by Google App Engine
This is Rietveld 408576698