From 83c87e5fdb763f9b68c30c77f286b63258b2b811 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 13 Feb 2015 16:37:13 -0800 Subject: run_javascript_tests.py: Be more flexible about directory layout. The top-level directory name isn't part of the repository, and we can't count on it always being "pdfium" (though many people will choose to do it this way). R=jam@chromium.org Review URL: https://codereview.chromium.org/921043005 --- testing/tools/run_javascript_tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/tools/run_javascript_tests.py b/testing/tools/run_javascript_tests.py index 237321e343..4361ea08f9 100755 --- a/testing/tools/run_javascript_tests.py +++ b/testing/tools/run_javascript_tests.py @@ -41,8 +41,9 @@ def main(): my_dir = os.path.dirname(os.path.realpath(__file__)) testing_dir = os.path.dirname(my_dir) pdfium_dir = os.path.dirname(testing_dir) - if os.path.basename(pdfium_dir) != 'pdfium': - print 'Confused, can not find pdfium directory, aborting.' + if (os.path.basename(my_dir) != 'tools' or + os.path.basename(testing_dir) != 'testing'): + print 'Confused, can not find pdfium root directory, aborting.' return 1 # Other scripts are found in the same directory as this one. -- cgit v1.2.3