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 GM results for two configs, across all builders. | 9 Compare GM results for two configs, across all builders. |
10 """ | 10 """ |
(...skipping 30 matching lines...) Expand all Loading... |
41 configs: (string, string) tuple; pair of configs to compare | 41 configs: (string, string) tuple; pair of configs to compare |
42 actuals_root: root directory containing all actual-results.json files | 42 actuals_root: root directory containing all actual-results.json files |
43 generated_images_root: directory within which to create all pixel diffs; | 43 generated_images_root: directory within which to create all pixel diffs; |
44 if this directory does not yet exist, it will be created | 44 if this directory does not yet exist, it will be created |
45 diff_base_url: base URL within which the client should look for diff | 45 diff_base_url: base URL within which the client should look for diff |
46 images; if not specified, defaults to a "file:///" URL representation | 46 images; if not specified, defaults to a "file:///" URL representation |
47 of generated_images_root | 47 of generated_images_root |
48 builder_regex_list: List of regular expressions specifying which builders | 48 builder_regex_list: List of regular expressions specifying which builders |
49 we will process. If None, process all builders. | 49 we will process. If None, process all builders. |
50 """ | 50 """ |
| 51 super(ConfigComparisons, self).__init__() |
51 time_start = int(time.time()) | 52 time_start = int(time.time()) |
52 if builder_regex_list != None: | 53 if builder_regex_list != None: |
53 self.set_match_builders_pattern_list(builder_regex_list) | 54 self.set_match_builders_pattern_list(builder_regex_list) |
54 self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root) | 55 self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root) |
55 self._diff_base_url = ( | 56 self._diff_base_url = ( |
56 diff_base_url or | 57 diff_base_url or |
57 url_utils.create_filepath_url(generated_images_root)) | 58 url_utils.create_filepath_url(generated_images_root)) |
58 self._actuals_root = actuals_root | 59 self._actuals_root = actuals_root |
59 self._load_config_pairs(configs) | 60 self._load_config_pairs(configs) |
60 self._timestamp = int(time.time()) | 61 self._timestamp = int(time.time()) |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 results_obj = ConfigComparisons(configs=args.config, | 199 results_obj = ConfigComparisons(configs=args.config, |
199 actuals_root=args.actuals, | 200 actuals_root=args.actuals, |
200 generated_images_root=args.workdir) | 201 generated_images_root=args.workdir) |
201 gm_json.WriteToFile( | 202 gm_json.WriteToFile( |
202 results_obj.get_packaged_results_of_type(results_type=args.results), | 203 results_obj.get_packaged_results_of_type(results_type=args.results), |
203 args.outfile) | 204 args.outfile) |
204 | 205 |
205 | 206 |
206 if __name__ == '__main__': | 207 if __name__ == '__main__': |
207 main() | 208 main() |
OLD | NEW |