OLD | NEW |
1 ''' | 1 ''' |
2 Compares the rendererings of serialized SkPictures to expected result. | |
3 | |
4 Copyright 2012 Google Inc. | 2 Copyright 2012 Google Inc. |
5 | 3 |
6 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
7 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 |
| 7 Compares the rendererings of serialized SkPictures to expected result. |
| 8 |
| 9 TODO(epoger): Combine with overlapping tools/tests/render_pictures_test.py . |
| 10 See https://code.google.com/p/skia/issues/detail?id=1943#c2 |
8 ''' | 11 ''' |
9 # common Python modules | 12 # common Python modules |
10 import os | 13 import os |
11 import optparse | 14 import optparse |
12 import sys | 15 import sys |
13 import shutil | 16 import shutil |
14 import tempfile | 17 import tempfile |
15 | 18 |
16 USAGE_STRING = 'Usage: %s input... expectedDir render_app [reander_app_args]' | 19 USAGE_STRING = 'Usage: %s input... expectedDir render_app [reander_app_args]' |
17 HELP_STRING = ''' | 20 HELP_STRING = ''' |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 112 |
110 if (diff_dir_option): | 113 if (diff_dir_option): |
111 diff_dir = diff_dir_option | 114 diff_dir = diff_dir_option |
112 else: | 115 else: |
113 diff_dir = tempfile.mkdtemp() | 116 diff_dir = tempfile.mkdtemp() |
114 try: | 117 try: |
115 RenderSkps(inputs, render_dir, render_app, render_args) | 118 RenderSkps(inputs, render_dir, render_app, render_args) |
116 DiffRenderings(expected_dir, render_dir, diff_dir) | 119 DiffRenderings(expected_dir, render_dir, diff_dir) |
117 finally: | 120 finally: |
118 Cleanup(render_dir_option, diff_dir_option, render_dir, diff_dir) | 121 Cleanup(render_dir_option, diff_dir_option, render_dir, diff_dir) |
OLD | NEW |