From 30d4f8372c362dfa9e4ba8c2fd8e264fe6bb0dca Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Tue, 14 Jan 2014 17:01:28 +0000 Subject: deprecate tools/test_rendering.py and tools/test_pictures.py they will be removed entirely on/after Feb 1 unless there is objection BUG=skia:1943 R=borenet@google.com Author: epoger@google.com Review URL: https://codereview.chromium.org/135783003 git-svn-id: http://skia.googlecode.com/svn/trunk@13065 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tools/test_pictures.py | 8 +++++++- tools/test_rendering.py | 15 ++++++++++++++- tools/tests/render_pictures_test.py | 4 ---- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/tools/test_pictures.py b/tools/test_pictures.py index 7ccb3b8731..8cf7410136 100644 --- a/tools/test_pictures.py +++ b/tools/test_pictures.py @@ -8,7 +8,8 @@ Compares the rendererings of serialized SkPictures to expected images. Launch with --help to see more information. -TODO(epoger): Combine with overlapping tools/tests/render_pictures_test.py . +TODO(epoger): We believe this tool is no longer used, so we have disabled it +and will remove it on 1 Feb 2014 if nobody objects. See https://code.google.com/p/skia/issues/detail?id=1943#c2 ''' # common Python modules @@ -60,6 +61,11 @@ def Main(args): @param The commandline argument list """ + print ('We believe this tool is no longer used, so we have disabled it ' + 'and will remove it on 1 Feb 2014 if nobody objects. See ' + 'https://code.google.com/p/skia/issues/detail?id=1943#c2') + sys.exit(-1) + parser = optparse.OptionParser(USAGE_STRING % '%prog' + HELP_STRING) parser.add_option('--render_dir', dest='render_dir', help = ("specify the location to output the rendered files." diff --git a/tools/test_rendering.py b/tools/test_rendering.py index 31e848b3c3..178cff7918 100644 --- a/tools/test_rendering.py +++ b/tools/test_rendering.py @@ -6,7 +6,8 @@ found in the LICENSE file. Compares the rendererings of serialized SkPictures to expected result. -TODO(epoger): Combine with overlapping tools/tests/render_pictures_test.py . +TODO(epoger): We believe this script is no longer used, so we have disabled it +and will remove it on 1 Feb 2014 if nobody objects. See https://code.google.com/p/skia/issues/detail?id=1943#c2 ''' # common Python modules @@ -24,11 +25,18 @@ by input with the files in expectedDir. Note, files in directoriers are expected to end with .skp. ''' +def _DieBecauseDeprecated(): + print ('We believe this script is no longer used, so we have disabled it ' + 'and will remove it on 1 Feb 2014 if nobody objects. See ' + 'https://code.google.com/p/skia/issues/detail?id=1943#c2') + sys.exit(-1) + def RunCommand(command): """Run a command. @param command the command as a single string """ + _DieBecauseDeprecated() print 'running command [%s]...' % command os.system(command) @@ -39,6 +47,7 @@ def FindPathToProgram(program): @param program the name of the program that is being looked for """ + _DieBecauseDeprecated() trunk_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) possible_paths = [os.path.join(trunk_path, 'out', 'Release', program), @@ -62,6 +71,7 @@ def RenderSkps(inputs, render_dir, render_app, args): @param inputs the location(s) to read the serlialized SkPictures @param render_dir the location to write out the rendered images """ + _DieBecauseDeprecated() renderer_path = FindPathToProgram(render_app) inputs_as_string = " ".join(inputs) command = '%s %s %s' % (renderer_path, inputs_as_string, render_dir) @@ -81,6 +91,7 @@ def DiffRenderings(expected_dir, comparison_dir, diff_dir): baseline @param diff_dir the location to write out the diff results """ + _DieBecauseDeprecated() skdiff_path = FindPathToProgram('skdiff') RunCommand('%s %s %s %s %s' % (skdiff_path, expected_dir, comparison_dir, diff_dir, @@ -96,6 +107,7 @@ def Cleanup(render_dir_option, diff_dir_option, render_dir, diff_dir): @param render_dir the directory where the rendered images were written @param diff_dir the directory where the diff results were written """ + _DieBecauseDeprecated() if (not render_dir_option): if (os.path.isdir(render_dir)): shutil.rmtree(render_dir) @@ -105,6 +117,7 @@ def Cleanup(render_dir_option, diff_dir_option, render_dir, diff_dir): def TestRenderSkps(inputs, expected_dir, render_dir_option, diff_dir_option, render_app, render_args): + _DieBecauseDeprecated() if (render_dir_option): render_dir = render_dir_option else: diff --git a/tools/tests/render_pictures_test.py b/tools/tests/render_pictures_test.py index ea14b608d3..89ea228412 100755 --- a/tools/tests/render_pictures_test.py +++ b/tools/tests/render_pictures_test.py @@ -7,10 +7,6 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Test the render_pictures binary. - -TODO(epoger): Combine with overlapping tools/test_rendering.py and -tools/test_pictures.py . -See https://code.google.com/p/skia/issues/detail?id=1943#c2 """ # System-level imports -- cgit v1.2.3