| 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 Repackage expected/actual GM results as needed by our HTML rebaseline viewer. | 9 Repackage expected/actual GM results as needed by our HTML rebaseline viewer. |
| 10 """ | 10 """ |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 results.KEY__RESULT_TYPE__NOCOMPARISON, | 219 results.KEY__RESULT_TYPE__NOCOMPARISON, |
| 220 results.KEY__RESULT_TYPE__SUCCEEDED, | 220 results.KEY__RESULT_TYPE__SUCCEEDED, |
| 221 ]) | 221 ]) |
| 222 failing_image_pairs.ensure_extra_column_values_in_summary( | 222 failing_image_pairs.ensure_extra_column_values_in_summary( |
| 223 column_id=results.KEY__EXTRACOLUMN__RESULT_TYPE, values=[ | 223 column_id=results.KEY__EXTRACOLUMN__RESULT_TYPE, values=[ |
| 224 results.KEY__RESULT_TYPE__FAILED, | 224 results.KEY__RESULT_TYPE__FAILED, |
| 225 results.KEY__RESULT_TYPE__FAILUREIGNORED, | 225 results.KEY__RESULT_TYPE__FAILUREIGNORED, |
| 226 results.KEY__RESULT_TYPE__NOCOMPARISON, | 226 results.KEY__RESULT_TYPE__NOCOMPARISON, |
| 227 ]) | 227 ]) |
| 228 | 228 |
| 229 builders = sorted(actual_builder_dicts.keys()) | 229 # Only consider builders we have both expected and actual results for. |
| 230 # Fixes http://skbug.com/2486 ('rebaseline_server shows actual results |
| 231 # (but not expectations) for Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug |
| 232 # builder') |
| 233 actual_builder_set = set(actual_builder_dicts.keys()) |
| 234 expected_builder_set = set(expected_builder_dicts.keys()) |
| 235 builders = sorted(actual_builder_set.intersection(expected_builder_set)) |
| 236 |
| 230 num_builders = len(builders) | 237 num_builders = len(builders) |
| 231 builder_num = 0 | 238 builder_num = 0 |
| 232 for builder in builders: | 239 for builder in builders: |
| 233 builder_num += 1 | 240 builder_num += 1 |
| 234 logging.info('Generating pixel diffs for builder #%d of %d, "%s"...' % | 241 logging.info('Generating pixel diffs for builder #%d of %d, "%s"...' % |
| 235 (builder_num, num_builders, builder)) | 242 (builder_num, num_builders, builder)) |
| 236 actual_results_for_this_builder = ( | 243 actual_results_for_this_builder = ( |
| 237 actual_builder_dicts[builder][gm_json.JSONKEY_ACTUALRESULTS]) | 244 actual_builder_dicts[builder][gm_json.JSONKEY_ACTUALRESULTS]) |
| 238 for result_type in sorted(actual_results_for_this_builder.keys()): | 245 for result_type in sorted(actual_results_for_this_builder.keys()): |
| 239 results_of_this_type = actual_results_for_this_builder[result_type] | 246 results_of_this_type = actual_results_for_this_builder[result_type] |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 results_obj = ExpectationComparisons(actuals_root=args.actuals, | 373 results_obj = ExpectationComparisons(actuals_root=args.actuals, |
| 367 expected_root=args.expectations, | 374 expected_root=args.expectations, |
| 368 generated_images_root=args.workdir) | 375 generated_images_root=args.workdir) |
| 369 gm_json.WriteToFile( | 376 gm_json.WriteToFile( |
| 370 results_obj.get_packaged_results_of_type(results_type=args.results), | 377 results_obj.get_packaged_results_of_type(results_type=args.results), |
| 371 args.outfile) | 378 args.outfile) |
| 372 | 379 |
| 373 | 380 |
| 374 if __name__ == '__main__': | 381 if __name__ == '__main__': |
| 375 main() | 382 main() |
| OLD | NEW |