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

Side by Side Diff: webkit/tools/layout_tests/rebaseline.py

Issue 170017: If you use the rebaseline.py script with a .git repo, (Closed)
Patch Set: review comments Created 11 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 unified diff | Download patch
« 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Rebaselining tool that automatically produces baselines for all platforms. 6 """Rebaselining tool that automatically produces baselines for all platforms.
7 7
8 The script does the following for each platform specified: 8 The script does the following for each platform specified:
9 1. Compile a list of tests that need rebaselining. 9 1. Compile a list of tests that need rebaselining.
10 2. Download test result archive from buildbot for the platform. 10 2. Download test result archive from buildbot for the platform.
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 415
416 Returns: 416 Returns:
417 True if the file already exists in SVN or is sucessfully added to SVN. 417 True if the file already exists in SVN or is sucessfully added to SVN.
418 False otherwise. 418 False otherwise.
419 """ 419 """
420 420
421 if not filename: 421 if not filename:
422 return False 422 return False
423 423
424 parent_dir, basename = os.path.split(filename) 424 parent_dir, basename = os.path.split(filename)
425 if parent_dir == filename:
426 logging.info("No svn checkout found. Assuming it's a git repo and not "
427 "adding")
428 return True
429
425 original_dir = os.getcwd() 430 original_dir = os.getcwd()
426 os.chdir(parent_dir) 431 os.chdir(parent_dir)
427 status_output = RunShell(['svn', 'status', basename], False) 432 status_output = RunShell(['svn', 'status', basename], False)
428 os.chdir(original_dir) 433 os.chdir(original_dir)
429 output = status_output.upper() 434 output = status_output.upper()
430 if output.startswith('A') or output.startswith('M'): 435 if output.startswith('A') or output.startswith('M'):
431 logging.info(' File already added to SVN: "%s"', filename) 436 logging.info(' File already added to SVN: "%s"', filename)
432 return True 437 return True
433 438
434 if output.find('IS NOT A WORKING COPY') >= 0: 439 if output.find('IS NOT A WORKING COPY') >= 0:
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 LogDashedString('Rebaselining result comparison started', None) 815 LogDashedString('Rebaselining result comparison started', None)
811 html_generator = HtmlGenerator(options, platforms, rebaselining_tests) 816 html_generator = HtmlGenerator(options, platforms, rebaselining_tests)
812 html_generator.GenerateHtml() 817 html_generator.GenerateHtml()
813 html_generator.ShowHtml() 818 html_generator.ShowHtml()
814 LogDashedString('Rebaselining result comparison done', None) 819 LogDashedString('Rebaselining result comparison done', None)
815 820
816 sys.exit(0) 821 sys.exit(0)
817 822
818 if '__main__' == __name__: 823 if '__main__' == __name__:
819 main() 824 main()
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