OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 ''' | 3 ''' |
4 Copyright 2013 Google Inc. | 4 Copyright 2013 Google Inc. |
5 | 5 |
6 Use of this source code is governed by a BSD-style license that can be | 6 Use of this source code is governed by a BSD-style license that can be |
7 found in the LICENSE file. | 7 found in the LICENSE file. |
8 ''' | 8 ''' |
9 | 9 |
10 ''' | 10 ''' |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 self._expectations_root = expectations_root | 70 self._expectations_root = expectations_root |
71 self._tests = tests | 71 self._tests = tests |
72 self._configs = configs | 72 self._configs = configs |
73 self._json_base_url = json_base_url | 73 self._json_base_url = json_base_url |
74 self._json_filename = json_filename | 74 self._json_filename = json_filename |
75 self._dry_run = dry_run | 75 self._dry_run = dry_run |
76 self._add_new = add_new | 76 self._add_new = add_new |
77 self._missing_json_is_fatal = missing_json_is_fatal | 77 self._missing_json_is_fatal = missing_json_is_fatal |
78 self._googlestorage_gm_actuals_root = ( | 78 self._googlestorage_gm_actuals_root = ( |
79 'http://chromium-skia-gm.commondatastorage.googleapis.com/gm') | 79 'http://chromium-skia-gm.commondatastorage.googleapis.com/gm') |
80 self._testname_pattern = re.compile('(\S+)_(\S+).png') | 80 self._testname_pattern = re.compile(gm_json.IMAGE_FILENAME_PATTERN) |
81 self._is_svn_checkout = ( | 81 self._is_svn_checkout = ( |
82 os.path.exists(os.path.join(expectations_root, '.svn')) or | 82 os.path.exists(os.path.join(expectations_root, '.svn')) or |
83 os.path.exists(os.path.join(expectations_root, os.pardir, '.svn'))) | 83 os.path.exists(os.path.join(expectations_root, os.pardir, '.svn'))) |
84 self._is_git_checkout = ( | 84 self._is_git_checkout = ( |
85 os.path.exists(os.path.join(expectations_root, '.git')) or | 85 os.path.exists(os.path.join(expectations_root, '.git')) or |
86 os.path.exists(os.path.join(expectations_root, os.pardir, '.git'))) | 86 os.path.exists(os.path.join(expectations_root, os.pardir, '.git'))) |
87 | 87 |
88 # If dry_run is False, execute subprocess.call(cmd). | 88 # If dry_run is False, execute subprocess.call(cmd). |
89 # If dry_run is True, print the command we would have otherwise run. | 89 # If dry_run is True, print the command we would have otherwise run. |
90 # Raises a CommandFailedException if the command fails. | 90 # Raises a CommandFailedException if the command fails. |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 if config not in self._configs: | 276 if config not in self._configs: |
277 skipped_files.append(filename) | 277 skipped_files.append(filename) |
278 continue | 278 continue |
279 outfilename = os.path.join(self._expectations_root, subdir, | 279 outfilename = os.path.join(self._expectations_root, subdir, |
280 filename); | 280 filename); |
281 self._RebaselineOneFile(expectations_subdir=subdir, | 281 self._RebaselineOneFile(expectations_subdir=subdir, |
282 builder_name=builder, | 282 builder_name=builder, |
283 infilename=filename, | 283 infilename=filename, |
284 outfilename=outfilename, | 284 outfilename=outfilename, |
285 all_results=all_results) | 285 all_results=all_results) |
OLD | NEW |