| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 """ | 3 """ |
| 4 Copyright 2014 Google Inc. | 4 Copyright 2014 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 Compare results of two render_pictures runs. | 9 Compare results of two render_pictures runs. |
| 10 """ | 10 """ |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 Args: | 90 Args: |
| 91 actuals_root: root directory containing all render_pictures-generated | 91 actuals_root: root directory containing all render_pictures-generated |
| 92 JSON files | 92 JSON files |
| 93 subdirs: (string, string) tuple; pair of subdirectories within | 93 subdirs: (string, string) tuple; pair of subdirectories within |
| 94 actuals_root to compare | 94 actuals_root to compare |
| 95 """ | 95 """ |
| 96 logging.info( | 96 logging.info( |
| 97 'Reading actual-results JSON files from %s subdirs within %s...' % ( | 97 'Reading actual-results JSON files from %s subdirs within %s...' % ( |
| 98 subdirs, actuals_root)) | 98 subdirs, actuals_root)) |
| 99 subdirA, subdirB = subdirs | 99 subdirA, subdirB = subdirs |
| 100 subdirA_builder_dicts = results.BaseComparisons._read_dicts_from_root( | 100 subdirA_builder_dicts = self._read_dicts_from_root( |
| 101 os.path.join(actuals_root, subdirA)) | 101 os.path.join(actuals_root, subdirA)) |
| 102 subdirB_builder_dicts = results.BaseComparisons._read_dicts_from_root( | 102 subdirB_builder_dicts = self._read_dicts_from_root( |
| 103 os.path.join(actuals_root, subdirB)) | 103 os.path.join(actuals_root, subdirB)) |
| 104 logging.info('Comparing subdirs %s and %s...' % (subdirA, subdirB)) | 104 logging.info('Comparing subdirs %s and %s...' % (subdirA, subdirB)) |
| 105 | 105 |
| 106 all_image_pairs = imagepairset.ImagePairSet( | 106 all_image_pairs = imagepairset.ImagePairSet( |
| 107 descriptions=subdirs, | 107 descriptions=subdirs, |
| 108 diff_base_url=self._diff_base_url) | 108 diff_base_url=self._diff_base_url) |
| 109 failing_image_pairs = imagepairset.ImagePairSet( | 109 failing_image_pairs = imagepairset.ImagePairSet( |
| 110 descriptions=subdirs, | 110 descriptions=subdirs, |
| 111 diff_base_url=self._diff_base_url) | 111 diff_base_url=self._diff_base_url) |
| 112 | 112 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 'got exception while creating ImagePair for image_name ' | 199 'got exception while creating ImagePair for image_name ' |
| 200 '"%s", builder "%s"' % (image_name, builder)) | 200 '"%s", builder "%s"' % (image_name, builder)) |
| 201 | 201 |
| 202 self._results = { | 202 self._results = { |
| 203 results.KEY__HEADER__RESULTS_ALL: all_image_pairs.as_dict(), | 203 results.KEY__HEADER__RESULTS_ALL: all_image_pairs.as_dict(), |
| 204 results.KEY__HEADER__RESULTS_FAILURES: failing_image_pairs.as_dict(), | 204 results.KEY__HEADER__RESULTS_FAILURES: failing_image_pairs.as_dict(), |
| 205 } | 205 } |
| 206 | 206 |
| 207 | 207 |
| 208 # TODO(epoger): Add main() so this can be called by vm_run_skia_try.sh | 208 # TODO(epoger): Add main() so this can be called by vm_run_skia_try.sh |
| OLD | NEW |