OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The PDFium Authors. All rights reserved. | 2 # Copyright 2015 The PDFium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import optparse | 6 import optparse |
7 import os | 7 import os |
8 import re | 8 import re |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 input_files.append(file_name.replace(".pdf", ".in")) | 83 input_files.append(file_name.replace(".pdf", ".in")) |
84 else: | 84 else: |
85 input_files = os.listdir(source_dir) | 85 input_files = os.listdir(source_dir) |
86 | 86 |
87 failures = [] | 87 failures = [] |
88 input_file_re = re.compile('^[a-zA-Z0-9_.]+[.]in$') | 88 input_file_re = re.compile('^[a-zA-Z0-9_.]+[.]in$') |
89 for input_filename in input_files: | 89 for input_filename in input_files: |
90 if input_file_re.match(input_filename): | 90 if input_file_re.match(input_filename): |
91 input_path = os.path.join(source_dir, input_filename) | 91 input_path = os.path.join(source_dir, input_filename) |
92 if os.path.isfile(input_path): | 92 if os.path.isfile(input_path): |
93 if test_suppressor.IsSuppressed(input_filename): | 93 if test_suppressor.IsResultSuppressed(input_filename): |
94 continue | 94 continue |
95 if not generate_and_test(input_filename, source_dir, working_dir, | 95 if not generate_and_test(input_filename, source_dir, working_dir, |
96 fixup_path, pdfium_test_path, image_differ, | 96 fixup_path, pdfium_test_path, image_differ, |
97 options.wrapper): | 97 options.wrapper): |
98 failures.append(input_path) | 98 failures.append(input_path) |
99 | 99 |
100 if failures: | 100 if failures: |
101 failures.sort() | 101 failures.sort() |
102 print '\n\nSummary of Failures:' | 102 print '\n\nSummary of Failures:' |
103 for failure in failures: | 103 for failure in failures: |
104 print failure | 104 print failure |
105 return 1 | 105 return 1 |
106 return 0 | 106 return 0 |
107 | 107 |
108 | 108 |
109 if __name__ == '__main__': | 109 if __name__ == '__main__': |
110 sys.exit(main()) | 110 sys.exit(main()) |
OLD | NEW |