Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: gm/rebaseline_server/results.py

Issue 184103022: rebaseline_server: keep going on exception in ImagePair.__init__() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 if expected_image_relative_url == actual_image_relative_url: 382 if expected_image_relative_url == actual_image_relative_url:
383 updated_result_type = KEY__RESULT_TYPE__SUCCEEDED 383 updated_result_type = KEY__RESULT_TYPE__SUCCEEDED
384 else: 384 else:
385 updated_result_type = result_type 385 updated_result_type = result_type
386 extra_columns_dict = { 386 extra_columns_dict = {
387 KEY__EXTRACOLUMN__RESULT_TYPE: updated_result_type, 387 KEY__EXTRACOLUMN__RESULT_TYPE: updated_result_type,
388 KEY__EXTRACOLUMN__BUILDER: builder, 388 KEY__EXTRACOLUMN__BUILDER: builder,
389 KEY__EXTRACOLUMN__TEST: test, 389 KEY__EXTRACOLUMN__TEST: test,
390 KEY__EXTRACOLUMN__CONFIG: config, 390 KEY__EXTRACOLUMN__CONFIG: config,
391 } 391 }
392 image_pair = imagepair.ImagePair( 392 try:
393 image_diff_db=self._image_diff_db, 393 image_pair = imagepair.ImagePair(
394 base_url=gm_json.GM_ACTUALS_ROOT_HTTP_URL, 394 image_diff_db=self._image_diff_db,
395 imageA_relative_url=expected_image_relative_url, 395 base_url=gm_json.GM_ACTUALS_ROOT_HTTP_URL,
396 imageB_relative_url=actual_image_relative_url, 396 imageA_relative_url=expected_image_relative_url,
397 expectations=expectations_dict, 397 imageB_relative_url=actual_image_relative_url,
398 extra_columns=extra_columns_dict) 398 expectations=expectations_dict,
399 all_image_pairs.add_image_pair(image_pair) 399 extra_columns=extra_columns_dict)
400 if updated_result_type != KEY__RESULT_TYPE__SUCCEEDED: 400 all_image_pairs.add_image_pair(image_pair)
401 failing_image_pairs.add_image_pair(image_pair) 401 if updated_result_type != KEY__RESULT_TYPE__SUCCEEDED:
402 failing_image_pairs.add_image_pair(image_pair)
403 except Exception:
404 logging.exception('got exception while creating new ImagePair')
rmistry 2014/03/04 01:04:27 Drive-by comment: It would help to log the thrown
borenet 2014/03/04 12:49:42 Agreed.
402 405
403 self._results = { 406 self._results = {
404 KEY__HEADER__RESULTS_ALL: all_image_pairs.as_dict(), 407 KEY__HEADER__RESULTS_ALL: all_image_pairs.as_dict(),
405 KEY__HEADER__RESULTS_FAILURES: failing_image_pairs.as_dict(), 408 KEY__HEADER__RESULTS_FAILURES: failing_image_pairs.as_dict(),
406 } 409 }
407 410
408 411
409 def main(): 412 def main():
410 logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', 413 logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
411 datefmt='%m/%d/%Y %H:%M:%S', 414 datefmt='%m/%d/%Y %H:%M:%S',
(...skipping 14 matching lines...) Expand all
426 args = parser.parse_args() 429 args = parser.parse_args()
427 results = Results(actuals_root=args.actuals, 430 results = Results(actuals_root=args.actuals,
428 expected_root=args.expectations, 431 expected_root=args.expectations,
429 generated_images_root=args.workdir) 432 generated_images_root=args.workdir)
430 gm_json.WriteToFile(results.get_results_of_type(KEY__HEADER__RESULTS_ALL), 433 gm_json.WriteToFile(results.get_results_of_type(KEY__HEADER__RESULTS_ALL),
431 args.outfile) 434 args.outfile)
432 435
433 436
434 if __name__ == '__main__': 437 if __name__ == '__main__':
435 main() 438 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698