Get test running scripts to detect and report common error, XFA.
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.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1150823003
Review URL: https://codereview.chromium.org/1158883005
diff --git a/testing/tools/run_javascript_tests.py b/testing/tools/run_javascript_tests.py
index 9b3d69e..ff66d9c 100755
--- a/testing/tools/run_javascript_tests.py
+++ b/testing/tools/run_javascript_tests.py
@@ -47,6 +47,10 @@
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)