OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 ''' | 3 ''' |
4 Copyright 2012 Google Inc. | 4 Copyright 2012 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 test_name = self._testname_pattern.match(infilename).group(1) | 133 test_name = self._testname_pattern.match(infilename).group(1) |
134 if not test_name: | 134 if not test_name: |
135 print '# unable to find test_name for infilename %s' % infilename | 135 print '# unable to find test_name for infilename %s' % infilename |
136 return False | 136 return False |
137 try: | 137 try: |
138 hash_type, hash_value = all_results[infilename] | 138 hash_type, hash_value = all_results[infilename] |
139 except KeyError: | 139 except KeyError: |
140 print ('# unable to find filename %s in all_results dict' % | 140 print ('# unable to find filename %s in all_results dict' % |
141 infilename) | 141 infilename) |
142 return False | 142 return False |
| 143 except ValueError as e: |
| 144 print '# ValueError reading filename %s from all_results dict: %s'%( |
| 145 infilename, e) |
| 146 return False |
143 url = '%s/%s/%s/%s.png' % (self._googlestorage_gm_actuals_root, | 147 url = '%s/%s/%s/%s.png' % (self._googlestorage_gm_actuals_root, |
144 hash_type, test_name, hash_value) | 148 hash_type, test_name, hash_value) |
145 try: | 149 try: |
146 self._DownloadFile(source_url=url, dest_filename=outfilename) | 150 self._DownloadFile(source_url=url, dest_filename=outfilename) |
147 return True | 151 return True |
148 except CommandFailedException: | 152 except CommandFailedException: |
149 print '# Couldn\'t fetch gs_url %s' % url | 153 print '# Couldn\'t fetch gs_url %s' % url |
150 return False | 154 return False |
151 | 155 |
152 # Download a single actual result from skia-autogen, returning True if it | 156 # Download a single actual result from skia-autogen, returning True if it |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 '"--tests aaclip bigmatrix"; if unspecified, then all ' + | 402 '"--tests aaclip bigmatrix"; if unspecified, then all ' + |
399 'failing tests (according to the actual-results.json ' + | 403 'failing tests (according to the actual-results.json ' + |
400 'file) will be rebaselined.') | 404 'file) will be rebaselined.') |
401 args = parser.parse_args() | 405 args = parser.parse_args() |
402 rebaseliner = Rebaseliner(tests=args.tests, configs=args.configs, | 406 rebaseliner = Rebaseliner(tests=args.tests, configs=args.configs, |
403 subdirs=args.subdirs, dry_run=args.dry_run, | 407 subdirs=args.subdirs, dry_run=args.dry_run, |
404 json_base_url=args.json_base_url, | 408 json_base_url=args.json_base_url, |
405 json_filename=args.json_filename, | 409 json_filename=args.json_filename, |
406 add_new=args.add_new) | 410 add_new=args.add_new) |
407 rebaseliner.RebaselineAll() | 411 rebaseliner.RebaselineAll() |
OLD | NEW |