Chromium Code Reviews| Index: gm/rebaseline_server/compare_rendered_pictures_test.py |
| diff --git a/gm/rebaseline_server/compare_configs_test.py b/gm/rebaseline_server/compare_rendered_pictures_test.py |
| similarity index 59% |
| copy from gm/rebaseline_server/compare_configs_test.py |
| copy to gm/rebaseline_server/compare_rendered_pictures_test.py |
| index 756af6615649506c414c016d87a5e61c955d1c78..c1eebb794b4aa45fce7d681467bdd1882fab254f 100755 |
| --- a/gm/rebaseline_server/compare_configs_test.py |
| +++ b/gm/rebaseline_server/compare_rendered_pictures_test.py |
| @@ -6,7 +6,7 @@ Copyright 2014 Google Inc. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| -Test compare_configs.py |
| +Test compare_rendered_pictures.py |
| TODO(epoger): Create a command to update the expected results (in |
| self._output_dir_expected) when appropriate. For now, you should: |
| @@ -23,25 +23,29 @@ import sys |
| # Imports from within Skia |
| import base_unittest |
| -import compare_configs |
| +import compare_rendered_pictures |
| import results |
| import gm_json # must import results first, so that gm_json will be in sys.path |
| -class CompareConfigsTest(base_unittest.TestCase): |
| +class CompareRenderedPicturesTest(base_unittest.TestCase): |
| - def test_gm(self): |
| - """Process results of a GM run with the ConfigComparisons object.""" |
| - results_obj = compare_configs.ConfigComparisons( |
| - configs=('8888', 'gpu'), |
| - actuals_root=os.path.join(self._input_dir, 'gm-actuals'), |
| + def test_endToEnd(self): |
| + """Compare results of two render_pictures runs.""" |
| + # TODO(epoger): Specify image_base_url pointing at the directory on local |
|
epoger
2014/04/04 15:31:53
Added a TODO here, after noticing that the unittes
|
| + # disk containing our test images, so that we can actually compute pixel |
| + # diffs. For now, this test attempts to download images from |
| + # DEFAULT_IMAGE_BASE_URL, and there aren't any there yet. |
| + results_obj = compare_rendered_pictures.RenderedPicturesComparisons( |
| + actuals_root=os.path.join(self._input_dir, 'render_pictures_output'), |
| + subdirs=('before_patch', 'after_patch'), |
| generated_images_root=self._temp_dir, |
| diff_base_url='/static/generated-images') |
| results_obj.get_timestamp = mock_get_timestamp |
| gm_json.WriteToFile( |
| results_obj.get_packaged_results_of_type( |
| results.KEY__HEADER__RESULTS_ALL), |
| - os.path.join(self._output_dir_actual, 'gm.json')) |
| + os.path.join(self._output_dir_actual, 'compare_rendered_pictures.json')) |
| def mock_get_timestamp(): |
| @@ -50,7 +54,7 @@ def mock_get_timestamp(): |
| def main(): |
| - base_unittest.main(CompareConfigsTest) |
| + base_unittest.main(CompareRenderedPicturesTest) |
| if __name__ == '__main__': |