From 79569e74ddddb12b3a76d211d826be2a3d87d0d0 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Wed, 20 May 2015 16:52:05 -0700 Subject: Get test running scripts to detect and report common error. testing/tools/run_corpus_tests.py assumes a debug build and will fail cryptically if only a release build is available. Arguably there shouldn't be a default because having one could lead to accidentally running a stale version, but that is probably too much of a change. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1150823003 --- testing/tools/run_corpus_tests.py | 4 ++++ testing/tools/run_javascript_tests.py | 4 ++++ testing/tools/run_pixel_tests.py | 4 ++++ 3 files changed, 12 insertions(+) (limited to 'testing') diff --git a/testing/tools/run_corpus_tests.py b/testing/tools/run_corpus_tests.py index 13376f7878..1876581e40 100755 --- a/testing/tools/run_corpus_tests.py +++ b/testing/tools/run_corpus_tests.py @@ -42,6 +42,10 @@ def main(): options, args = parser.parse_args() finder = common.DirectoryFinder(options.build_dir) pdfium_test_path = finder.ExecutablePath('pdfium_test') + if not os.path.exists(pdfium_test_path): + print "FAILURE: Can't find test executable '%s'" % pdfium_test_path + print "Use --build-dir to specify its location." + return 1 working_dir = finder.WorkingDir(os.path.join('testing', 'corpus')) if not os.path.exists(working_dir): os.makedirs(working_dir) diff --git a/testing/tools/run_javascript_tests.py b/testing/tools/run_javascript_tests.py index 9b3d69e8f3..ff66d9c350 100755 --- a/testing/tools/run_javascript_tests.py +++ b/testing/tools/run_javascript_tests.py @@ -47,6 +47,10 @@ def main(): text_diff_path = finder.ScriptPath('text_diff.py') source_dir = finder.TestingDir(os.path.join('resources', 'javascript')) pdfium_test_path = finder.ExecutablePath('pdfium_test') + if not os.path.exists(pdfium_test_path): + print "FAILURE: Can't find test executable '%s'" % pdfium_test_path + print "Use --build-dir to specify its location." + return 1 working_dir = finder.WorkingDir(os.path.join('testing', 'javascript')) if not os.path.exists(working_dir): os.makedirs(working_dir) diff --git a/testing/tools/run_pixel_tests.py b/testing/tools/run_pixel_tests.py index 1fec0ddcb1..168846265b 100755 --- a/testing/tools/run_pixel_tests.py +++ b/testing/tools/run_pixel_tests.py @@ -46,6 +46,10 @@ def main(): fixup_path = finder.ScriptPath('fixup_pdf_template.py') source_dir = finder.TestingDir(os.path.join('resources', 'pixel')) pdfium_test_path = finder.ExecutablePath('pdfium_test') + if not os.path.exists(pdfium_test_path): + print "FAILURE: Can't find test executable '%s'" % pdfium_test_path + print "Use --build-dir to specify its location." + return 1 working_dir = finder.WorkingDir(os.path.join('testing', 'pixel')) if not os.path.exists(working_dir): os.makedirs(working_dir) -- cgit v1.2.3