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

Side by Side Diff: tools/test_rendering.py

Issue 124253002: add unittest for render_pictures binary (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 11 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 | « tools/test_pictures.py ('k') | tools/tests/base_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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)
OLDNEW
« no previous file with comments | « tools/test_pictures.py ('k') | tools/tests/base_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698