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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 skipped_images.append(image_name) | 181 skipped_images.append(image_name) |
182 continue | 182 continue |
183 expectations_dict[gm_json.JSONKEY_EXPECTEDRESULTS] \ | 183 expectations_dict[gm_json.JSONKEY_EXPECTEDRESULTS] \ |
184 [image_name] \ | 184 [image_name] \ |
185 [gm_json.JSONKEY_EXPECTEDRESULTS_ALLOWEDDIGESTS
] = \ | 185 [gm_json.JSONKEY_EXPECTEDRESULTS_ALLOWEDDIGESTS
] = \ |
186 [image_results] | 186 [image_results] |
187 | 187 |
188 # Write out updated expectations. | 188 # Write out updated expectations. |
189 gm_json.WriteToFile(expectations_dict, expectations_json_filepath) | 189 gm_json.WriteToFile(expectations_dict, expectations_json_filepath) |
190 | 190 |
191 if skipped_images: | |
192 print ('Skipped these tests due to test/config filters: %s' % | |
193 skipped_images) | |
194 | |
195 | 191 |
196 # main... | 192 # main... |
197 | 193 |
198 parser = argparse.ArgumentParser() | 194 parser = argparse.ArgumentParser() |
199 parser.add_argument('--actuals-base-url', | 195 parser.add_argument('--actuals-base-url', |
200 help='base URL from which to read files containing JSON ' + | 196 help='base URL from which to read files containing JSON ' + |
201 'summaries of actual GM results; defaults to %(default)s', | 197 'summaries of actual GM results; defaults to %(default)s', |
202 default='http://skia-autogen.googlecode.com/svn/gm-actual') | 198 default='http://skia-autogen.googlecode.com/svn/gm-actual') |
203 parser.add_argument('--actuals-filename', | 199 parser.add_argument('--actuals-filename', |
204 help='filename (within platform-specific subdirectories ' + | 200 help='filename (within platform-specific subdirectories ' + |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 args.expectations_filename) | 264 args.expectations_filename) |
269 if os.path.isfile(expectations_json_file): | 265 if os.path.isfile(expectations_json_file): |
270 rebaseliner = JsonRebaseliner( | 266 rebaseliner = JsonRebaseliner( |
271 expectations_root=args.expectations_root, | 267 expectations_root=args.expectations_root, |
272 expectations_filename=args.expectations_filename, | 268 expectations_filename=args.expectations_filename, |
273 tests=args.tests, configs=args.configs, | 269 tests=args.tests, configs=args.configs, |
274 actuals_base_url=args.actuals_base_url, | 270 actuals_base_url=args.actuals_base_url, |
275 actuals_filename=args.actuals_filename, | 271 actuals_filename=args.actuals_filename, |
276 add_new=args.add_new) | 272 add_new=args.add_new) |
277 else: | 273 else: |
| 274 # TODO(epoger): When we get rid of the ImageRebaseliner implementation, |
| 275 # we should raise an Exception in this case (no JSON expectations file |
| 276 # found to update), to prevent a recurrence of |
| 277 # https://code.google.com/p/skia/issues/detail?id=1403 ('rebaseline.py |
| 278 # script fails with misleading output when run outside of gm-expected |
| 279 # dir') |
278 rebaseliner = rebaseline_imagefiles.ImageRebaseliner( | 280 rebaseliner = rebaseline_imagefiles.ImageRebaseliner( |
279 expectations_root=args.expectations_root, | 281 expectations_root=args.expectations_root, |
280 tests=args.tests, configs=args.configs, | 282 tests=args.tests, configs=args.configs, |
281 dry_run=args.dry_run, | 283 dry_run=args.dry_run, |
282 json_base_url=args.actuals_base_url, | 284 json_base_url=args.actuals_base_url, |
283 json_filename=args.actuals_filename, | 285 json_filename=args.actuals_filename, |
284 add_new=args.add_new, | 286 add_new=args.add_new, |
285 missing_json_is_fatal=missing_json_is_fatal) | 287 missing_json_is_fatal=missing_json_is_fatal) |
286 rebaseliner.RebaselineSubdir(subdir=subdir, builder=builder) | 288 rebaseliner.RebaselineSubdir(subdir=subdir, builder=builder) |
OLD | NEW |