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 Test compare_rendered_pictures.py | 9 Test compare_rendered_pictures.py |
10 | 10 |
11 TODO(epoger): Create a command to update the expected results (in | 11 TODO(epoger): Create a command to update the expected results (in |
12 self._output_dir_expected) when appropriate. For now, you should: | 12 self._output_dir_expected) when appropriate. For now, you should: |
13 1. examine the results in self.output_dir_actual and make sure they are ok | 13 1. examine the results in self.output_dir_actual and make sure they are ok |
14 2. rm -rf self._output_dir_expected | 14 2. rm -rf self._output_dir_expected |
15 3. mv self.output_dir_actual self._output_dir_expected | 15 3. mv self.output_dir_actual self._output_dir_expected |
16 Although, if you're using an SVN checkout, this will blow away .svn directories | 16 Although, if you're using an SVN checkout, this will blow away .svn directories |
17 within self._output_dir_expected, which wouldn't be good... | 17 within self._output_dir_expected, which wouldn't be good... |
18 | 18 |
19 """ | 19 """ |
20 | 20 |
21 # System-level imports | 21 # System-level imports |
22 import os | 22 import os |
23 import posixpath | 23 import posixpath |
24 import subprocess | 24 import subprocess |
25 | 25 |
26 # Must fix up PYTHONPATH before importing from within Skia | 26 # Must fix up PYTHONPATH before importing from within Skia |
27 import fix_pythonpath # pylint: disable=W0611 | 27 import rs_fixpypath # pylint: disable=W0611 |
28 | 28 |
29 # Imports from within Skia | 29 # Imports from within Skia |
30 import base_unittest | 30 import base_unittest |
31 import compare_rendered_pictures | 31 import compare_rendered_pictures |
32 import find_run_binary | 32 import find_run_binary |
33 import gm_json | 33 import gm_json |
34 import imagediffdb | 34 import imagediffdb |
35 import results | 35 import results |
36 | 36 |
37 | 37 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 """Mock version of BaseComparisons.get_timestamp() for testing.""" | 155 """Mock version of BaseComparisons.get_timestamp() for testing.""" |
156 return 12345678 | 156 return 12345678 |
157 | 157 |
158 | 158 |
159 def main(): | 159 def main(): |
160 base_unittest.main(CompareRenderedPicturesTest) | 160 base_unittest.main(CompareRenderedPicturesTest) |
161 | 161 |
162 | 162 |
163 if __name__ == '__main__': | 163 if __name__ == '__main__': |
164 main() | 164 main() |
OLD | NEW |