Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: testing/tools/run_javascript_tests.py

Issue 1407913005: Allow running individual tests. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: testing/tools/run_javascript_tests.py
diff --git a/testing/tools/run_javascript_tests.py b/testing/tools/run_javascript_tests.py
index f9344a145fcb9a71b2d390bbabe60fe00f6471ec..00f7c9f26fb97e50ea944cef7d0c53dfc4e29809 100755
--- a/testing/tools/run_javascript_tests.py
+++ b/testing/tools/run_javascript_tests.py
@@ -42,6 +42,7 @@ def main():
parser.add_option('--build-dir', default=os.path.join('out', 'Debug'),
help='relative path from the base source directory')
options, args = parser.parse_args()
+
finder = common.DirectoryFinder(options.build_dir)
fixup_path = finder.ScriptPath('fixup_pdf_template.py')
text_diff_path = finder.ScriptPath('text_diff.py')
@@ -55,9 +56,17 @@ def main():
if not os.path.exists(working_dir):
os.makedirs(working_dir)
+ input_files = []
+ for file_name in args:
+ file_name = file_name.replace(".pdf", ".in")
+ input_files.append(file_name)
Tom Sepez 2015/10/28 20:25:48 nit: assignment not needed, combine with previous
dsinclair 2015/10/28 20:56:46 Done.
+
+ if len(input_files) == 0:
Tom Sepez 2015/10/28 20:25:48 Why not do the same if len(args): ... else: as in
dsinclair 2015/10/28 20:56:46 Done.
+ input_files = os.listdir(source_dir)
+
failures = []
input_file_re = re.compile('^[a-zA-Z0-9_.]+[.]in$')
- for input_filename in os.listdir(source_dir):
+ for input_filename in input_files:
if input_file_re.match(input_filename):
input_path = os.path.join(source_dir, input_filename)
if os.path.isfile(input_path):

Powered by Google App Engine
This is Rietveld 408576698