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

Side by Side Diff: Tools/Scripts/webkitpy/tool/commands/rebaseline.py

Issue 319383002: Update comment now that I understand it better. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 Google Inc. All rights reserved. 1 # Copyright (c) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 return optimize_commands 441 return optimize_commands
442 442
443 def _update_expectations_files(self, lines_to_remove): 443 def _update_expectations_files(self, lines_to_remove):
444 # FIXME: This routine is way too expensive. We're creating O(n ports) Te stExpectations objects. 444 # FIXME: This routine is way too expensive. We're creating O(n ports) Te stExpectations objects.
445 # This is slow and uses a lot of memory. 445 # This is slow and uses a lot of memory.
446 tests = lines_to_remove.keys() 446 tests = lines_to_remove.keys()
447 to_remove = [] 447 to_remove = []
448 448
449 # This is so we remove lines for builders that skip this test, e.g. Andr oid skips most 449 # This is so we remove lines for builders that skip this test, e.g. Andr oid skips most
450 # tests and we don't want to leave stray [ Android ] lines in TestExpect ations.. 450 # tests and we don't want to leave stray [ Android ] lines in TestExpect ations..
451 # FIXME: Is this necessary at all now that _rebaseline_commands includes the builders that 451 # This is only necessary for "webkit-patch rebaseline" and for rebaselin ing expected
452 # used to be skipped because the result wasn't failing on tip of tree? 452 # failures from garden-o-matic. rebaseline-expectations and auto-rebasel ine will always
453 # pass the exact set of ports to rebaseline.
453 for port_name in self._tool.port_factory.all_port_names(): 454 for port_name in self._tool.port_factory.all_port_names():
454 port = self._tool.port_factory.get(port_name) 455 port = self._tool.port_factory.get(port_name)
455 generic_expectations = TestExpectations(port, tests=tests, include_o verrides=False) 456 generic_expectations = TestExpectations(port, tests=tests, include_o verrides=False)
456 full_expectations = TestExpectations(port, tests=tests, include_over rides=True) 457 full_expectations = TestExpectations(port, tests=tests, include_over rides=True)
457 for test in tests: 458 for test in tests:
458 if self._port_skips_test(port, test, generic_expectations, full_ expectations): 459 if self._port_skips_test(port, test, generic_expectations, full_ expectations):
459 for test_configuration in port.all_test_configurations(): 460 for test_configuration in port.all_test_configurations():
460 if test_configuration.version == port.test_configuration ().version: 461 if test_configuration.version == port.test_configuration ().version:
461 to_remove.append((test, test_configuration)) 462 to_remove.append((test, test_configuration))
462 463
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 if options.verbose: 930 if options.verbose:
930 rebaseline_command.append('--verbose') 931 rebaseline_command.append('--verbose')
931 # Use call instead of run_command so that stdout doesn't get swa llowed. 932 # Use call instead of run_command so that stdout doesn't get swa llowed.
932 tool.executive.call(rebaseline_command) 933 tool.executive.call(rebaseline_command)
933 except: 934 except:
934 traceback.print_exc(file=sys.stderr) 935 traceback.print_exc(file=sys.stderr)
935 # Sometimes git crashes and leaves us on a detached head. 936 # Sometimes git crashes and leaves us on a detached head.
936 tool.scm().checkout_branch(old_branch_name) 937 tool.scm().checkout_branch(old_branch_name)
937 938
938 time.sleep(self.SLEEP_TIME_IN_SECONDS) 939 time.sleep(self.SLEEP_TIME_IN_SECONDS)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698