Index: testing/tools/run_javascript_tests.py |
diff --git a/testing/tools/run_javascript_tests.py b/testing/tools/run_javascript_tests.py |
index ddc82665d56289558cdf8cde1d0996984444176c..3a57d75cace695dbef6971793a0ce217cb588e17 100755 |
--- a/testing/tools/run_javascript_tests.py |
+++ b/testing/tools/run_javascript_tests.py |
@@ -23,6 +23,7 @@ def generate_and_test(input_filename, source_dir, working_dir, |
txt_path = os.path.join(working_dir, input_root + '.txt') |
expected_path = os.path.join(source_dir, input_root + '_expected.txt') |
try: |
+ sys.stdout.flush() |
subprocess.check_call( |
[fixup_path, '--output-dir=' + working_dir, input_path]) |
with open(txt_path, 'w') as outfile: |
@@ -46,7 +47,7 @@ def main(): |
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 |
+ return 2 |
# Other scripts are found in the same directory as this one. |
fixup_path = os.path.join(my_dir, 'fixup_pdf_template.py') |
@@ -80,7 +81,7 @@ def main(): |
if not os.path.exists(working_dir): |
os.makedirs(working_dir) |
- os_exit_code = 0 |
+ failures = [] |
input_file_re = re.compile('^[a-zA-Z0-9_.]+[.]in$') |
for input_filename in os.listdir(source_dir): |
if input_file_re.match(input_filename): |
@@ -88,9 +89,14 @@ def main(): |
if os.path.isfile(input_path): |
if not generate_and_test(input_filename, source_dir, working_dir, |
fixup_path, pdfium_test_path): |
- os_exit_code = 1 |
+ failures.append(input_path) |
- return os_exit_code |
+ if failures: |
+ print '\n\nSummary of Failures:' |
+ for failure in failures: |
+ print failure |
+ return 2 |
+ return 0 |
if __name__ == '__main__': |