Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Fetches a copy of the latest state of a W3C test repository and commits. | 5 """Fetches a copy of the latest state of a W3C test repository and commits. |
| 6 | 6 |
| 7 If this script is given the argument --auto-update, it will also attempt to | 7 If this script is given the argument --auto-update, it will also attempt to |
| 8 upload a CL, triggery try jobs, and make any changes that are required for | 8 upload a CL, triggery try jobs, and make any changes that are required for |
| 9 new failing tests before committing. | 9 new failing tests before committing. |
| 10 """ | 10 """ |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 417 # then the original string is used. If the warnings are reset, t hen the | 417 # then the original string is used. If the warnings are reset, t hen the |
| 418 # expectation line is re-serialized when output. | 418 # expectation line is re-serialized when output. |
| 419 expectation_line.warnings = [] | 419 expectation_line.warnings = [] |
| 420 changed_lines.append(expectation_line) | 420 changed_lines.append(expectation_line) |
| 421 new_lines.append(expectation_line) | 421 new_lines.append(expectation_line) |
| 422 new_file_contents = TestExpectations.list_to_string(new_lines, reconstit ute_only_these=changed_lines) | 422 new_file_contents = TestExpectations.list_to_string(new_lines, reconstit ute_only_these=changed_lines) |
| 423 self.host.filesystem.write_text_file(path, new_file_contents) | 423 self.host.filesystem.write_text_file(path, new_file_contents) |
| 424 | 424 |
| 425 def _list_deleted_tests(self): | 425 def _list_deleted_tests(self): |
| 426 """Returns a list of layout tests that have been deleted.""" | 426 """Returns a list of layout tests that have been deleted.""" |
| 427 out = self.check_run(['git', 'diff', 'origin/master', '--diff-filter=D', '--name-only']) | 427 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff- filter=D', '--name-only']) |
|
Dirk Pranke
2016/10/26 17:50:25
You might want --no-rename instead, I'm not sure i
qyearsley
2016/10/26 18:00:19
It looks like the difference is: with --no-renames
| |
| 428 deleted_tests = [] | 428 deleted_tests = [] |
| 429 for line in out.splitlines(): | 429 for line in out.splitlines(): |
| 430 test = self.finder.layout_test_name(line) | 430 test = self.finder.layout_test_name(line) |
| 431 if test: | 431 if test: |
| 432 deleted_tests.append(test) | 432 deleted_tests.append(test) |
| 433 return deleted_tests | 433 return deleted_tests |
| 434 | 434 |
| 435 def _list_renamed_tests(self): | 435 def _list_renamed_tests(self): |
| 436 """Returns a dict mapping source to dest name for layout tests that have been renamed.""" | 436 """Returns a dict mapping source to dest name for layout tests that have been renamed.""" |
| 437 out = self.check_run(['git', 'diff', 'origin/master', '--diff-filter=R', '--name-status']) | 437 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff- filter=R', '--name-status']) |
| 438 renamed_tests = {} | 438 renamed_tests = {} |
| 439 for line in out.splitlines(): | 439 for line in out.splitlines(): |
| 440 _, source_path, dest_path = line.split() | 440 _, source_path, dest_path = line.split() |
| 441 source_test = self.finder.layout_test_name(source_path) | 441 source_test = self.finder.layout_test_name(source_path) |
| 442 dest_test = self.finder.layout_test_name(dest_path) | 442 dest_test = self.finder.layout_test_name(dest_path) |
| 443 if source_test and dest_test: | 443 if source_test and dest_test: |
| 444 renamed_tests[source_test] = dest_test | 444 renamed_tests[source_test] = dest_test |
| 445 return renamed_tests | 445 return renamed_tests |
| OLD | NEW |