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 HTTP server for our HTML rebaseline viewer. | 9 HTTP server for our HTML rebaseline viewer. |
10 """ | 10 """ |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 self._export = export | 243 self._export = export |
244 self._editable = editable | 244 self._editable = editable |
245 self._reload_seconds = reload_seconds | 245 self._reload_seconds = reload_seconds |
246 self._config_pairs = config_pairs or [] | 246 self._config_pairs = config_pairs or [] |
247 self._builder_regex_list = builder_regex_list | 247 self._builder_regex_list = builder_regex_list |
248 _create_index( | 248 _create_index( |
249 file_path=os.path.join( | 249 file_path=os.path.join( |
250 PARENT_DIRECTORY, STATIC_CONTENTS_SUBDIR, GENERATED_HTML_SUBDIR, | 250 PARENT_DIRECTORY, STATIC_CONTENTS_SUBDIR, GENERATED_HTML_SUBDIR, |
251 "index.html"), | 251 "index.html"), |
252 config_pairs=config_pairs) | 252 config_pairs=config_pairs) |
| 253 # TODO(epoger): Create shareable functions within download_actuals.py that |
| 254 # we can use both there and here to download the actual image results. |
253 if actuals_repo_url: | 255 if actuals_repo_url: |
254 self._actuals_repo = _create_svn_checkout( | 256 self._actuals_repo = _create_svn_checkout( |
255 dir_path=actuals_dir, repo_url=actuals_repo_url) | 257 dir_path=actuals_dir, repo_url=actuals_repo_url) |
256 | 258 |
257 # Reentrant lock that must be held whenever updating EITHER of: | 259 # Reentrant lock that must be held whenever updating EITHER of: |
258 # 1. self._results | 260 # 1. self._results |
259 # 2. the expected or actual results on local disk | 261 # 2. the expected or actual results on local disk |
260 self.results_rlock = threading.RLock() | 262 self.results_rlock = threading.RLock() |
261 # self._results will be filled in by calls to update_results() | 263 # self._results will be filled in by calls to update_results() |
262 self._results = None | 264 self._results = None |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 actuals_repo_revision=args.actuals_revision, | 675 actuals_repo_revision=args.actuals_revision, |
674 actuals_repo_url=args.actuals_repo, | 676 actuals_repo_url=args.actuals_repo, |
675 port=args.port, export=args.export, editable=args.editable, | 677 port=args.port, export=args.export, editable=args.editable, |
676 reload_seconds=args.reload, config_pairs=config_pairs, | 678 reload_seconds=args.reload, config_pairs=config_pairs, |
677 builder_regex_list=args.builders) | 679 builder_regex_list=args.builders) |
678 _SERVER.run() | 680 _SERVER.run() |
679 | 681 |
680 | 682 |
681 if __name__ == '__main__': | 683 if __name__ == '__main__': |
682 main() | 684 main() |
OLD | NEW |