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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 if image_differ.HasDifferences(input_filename, source_dir, working_dir): | 48 if image_differ.HasDifferences(input_filename, source_dir, working_dir): |
49 print "FAILURE: " + input_filename | 49 print "FAILURE: " + input_filename |
50 return False | 50 return False |
51 return True | 51 return True |
52 | 52 |
53 | 53 |
54 def main(): | 54 def main(): |
55 parser = optparse.OptionParser() | 55 parser = optparse.OptionParser() |
56 parser.add_option('--build-dir', default=os.path.join('out', 'Debug'), | 56 parser.add_option('--build-dir', default=os.path.join('out', 'Debug'), |
57 help='relative path from the base source directory') | 57 help='relative path from the base source directory') |
| 58 parser.add_option('-j', default=1, |
| 59 dest='num_workers', type='int', |
| 60 help='run NUM_WORKERS jobs in parallel (currently ignored)') |
58 parser.add_option('--wrapper', default='', dest="wrapper", | 61 parser.add_option('--wrapper', default='', dest="wrapper", |
59 help='Dr. Memory wrapper for running test under Dr. Memory') | 62 help='Dr. Memory wrapper for running test under Dr. Memory') |
60 options, args = parser.parse_args() | 63 options, args = parser.parse_args() |
61 finder = common.DirectoryFinder(options.build_dir) | 64 finder = common.DirectoryFinder(options.build_dir) |
62 fixup_path = finder.ScriptPath('fixup_pdf_template.py') | 65 fixup_path = finder.ScriptPath('fixup_pdf_template.py') |
63 source_dir = finder.TestingDir(os.path.join('resources', 'pixel')) | 66 source_dir = finder.TestingDir(os.path.join('resources', 'pixel')) |
64 pdfium_test_path = finder.ExecutablePath('pdfium_test') | 67 pdfium_test_path = finder.ExecutablePath('pdfium_test') |
65 if not os.path.exists(pdfium_test_path): | 68 if not os.path.exists(pdfium_test_path): |
66 print "FAILURE: Can't find test executable '%s'" % pdfium_test_path | 69 print "FAILURE: Can't find test executable '%s'" % pdfium_test_path |
67 print "Use --build-dir to specify its location." | 70 print "Use --build-dir to specify its location." |
(...skipping 30 matching lines...) Expand all Loading... |
98 failures.sort() | 101 failures.sort() |
99 print '\n\nSummary of Failures:' | 102 print '\n\nSummary of Failures:' |
100 for failure in failures: | 103 for failure in failures: |
101 print failure | 104 print failure |
102 return 1 | 105 return 1 |
103 return 0 | 106 return 0 |
104 | 107 |
105 | 108 |
106 if __name__ == '__main__': | 109 if __name__ == '__main__': |
107 sys.exit(main()) | 110 sys.exit(main()) |
OLD | NEW |