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 28 matching lines...) Expand all Loading... |
39 [sys.executable, text_diff_path, expected_path, txt_path]) | 39 [sys.executable, text_diff_path, expected_path, txt_path]) |
40 except subprocess.CalledProcessError as e: | 40 except subprocess.CalledProcessError as e: |
41 print "FAILURE: " + input_filename + "; " + str(e) | 41 print "FAILURE: " + input_filename + "; " + str(e) |
42 return False | 42 return False |
43 return True | 43 return True |
44 | 44 |
45 def main(): | 45 def main(): |
46 parser = optparse.OptionParser() | 46 parser = optparse.OptionParser() |
47 parser.add_option('--build-dir', default=os.path.join('out', 'Debug'), | 47 parser.add_option('--build-dir', default=os.path.join('out', 'Debug'), |
48 help='relative path from the base source directory') | 48 help='relative path from the base source directory') |
| 49 parser.add_option('-j', default=1, |
| 50 dest='num_workers', type='int', |
| 51 help='run NUM_WORKERS jobs in parallel (currently ignored)') |
49 parser.add_option('--wrapper', default='', dest="wrapper", | 52 parser.add_option('--wrapper', default='', dest="wrapper", |
50 help='Dr. Memory wrapper for running test under Dr. Memory') | 53 help='Dr. Memory wrapper for running test under Dr. Memory') |
51 options, args = parser.parse_args() | 54 options, args = parser.parse_args() |
52 | 55 |
53 finder = common.DirectoryFinder(options.build_dir) | 56 finder = common.DirectoryFinder(options.build_dir) |
54 fixup_path = finder.ScriptPath('fixup_pdf_template.py') | 57 fixup_path = finder.ScriptPath('fixup_pdf_template.py') |
55 text_diff_path = finder.ScriptPath('text_diff.py') | 58 text_diff_path = finder.ScriptPath('text_diff.py') |
56 source_dir = finder.TestingDir(os.path.join('resources', 'javascript')) | 59 source_dir = finder.TestingDir(os.path.join('resources', 'javascript')) |
57 pdfium_test_path = finder.ExecutablePath('pdfium_test') | 60 pdfium_test_path = finder.ExecutablePath('pdfium_test') |
58 if not os.path.exists(pdfium_test_path): | 61 if not os.path.exists(pdfium_test_path): |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 failures.sort() | 93 failures.sort() |
91 print '\n\nSummary of Failures:' | 94 print '\n\nSummary of Failures:' |
92 for failure in failures: | 95 for failure in failures: |
93 print failure | 96 print failure |
94 return 1 | 97 return 1 |
95 return 0 | 98 return 0 |
96 | 99 |
97 | 100 |
98 if __name__ == '__main__': | 101 if __name__ == '__main__': |
99 sys.exit(main()) | 102 sys.exit(main()) |
OLD | NEW |