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

Side by Side Diff: testing/tools/run_corpus_tests.py

Issue 1607113002: Merge to XFA: Hook up show-config to testing scripts. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | testing/tools/run_javascript_tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 cStringIO 6 import cStringIO
7 import functools 7 import functools
8 import multiprocessing 8 import multiprocessing
9 import optparse 9 import optparse
10 import os 10 import os
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 finder = common.DirectoryFinder(options.build_dir) 95 finder = common.DirectoryFinder(options.build_dir)
96 pdfium_test_path = finder.ExecutablePath('pdfium_test') 96 pdfium_test_path = finder.ExecutablePath('pdfium_test')
97 if not os.path.exists(pdfium_test_path): 97 if not os.path.exists(pdfium_test_path):
98 print "FAILURE: Can't find test executable '%s'" % pdfium_test_path 98 print "FAILURE: Can't find test executable '%s'" % pdfium_test_path
99 print "Use --build-dir to specify its location." 99 print "Use --build-dir to specify its location."
100 return 1 100 return 1
101 working_dir = finder.WorkingDir(os.path.join('testing', 'corpus')) 101 working_dir = finder.WorkingDir(os.path.join('testing', 'corpus'))
102 if not os.path.exists(working_dir): 102 if not os.path.exists(working_dir):
103 os.makedirs(working_dir) 103 os.makedirs(working_dir)
104 104
105 test_suppressor = suppressor.Suppressor(finder) 105 feature_string = subprocess.check_output([pdfium_test_path, '--show-config'])
106 test_suppressor = suppressor.Suppressor(finder, feature_string)
106 image_differ = pngdiffer.PNGDiffer(finder) 107 image_differ = pngdiffer.PNGDiffer(finder)
107 108
108 # test files are under .../pdfium/testing/corpus. 109 # test files are under .../pdfium/testing/corpus.
109 failures = [] 110 failures = []
110 surprises = [] 111 surprises = []
111 walk_from_dir = finder.TestingDir('corpus'); 112 walk_from_dir = finder.TestingDir('corpus');
112 input_file_re = re.compile('^[a-zA-Z0-9_.]+[.]pdf$') 113 input_file_re = re.compile('^[a-zA-Z0-9_.]+[.]pdf$')
113 test_cases = [] 114 test_cases = []
114 115
115 if len(args): 116 if len(args):
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 print '\n\nSummary of Failures:' 167 print '\n\nSummary of Failures:'
167 for failure in failures: 168 for failure in failures:
168 print failure 169 print failure
169 return 1 170 return 1
170 171
171 return 0 172 return 0
172 173
173 174
174 if __name__ == '__main__': 175 if __name__ == '__main__':
175 sys.exit(main()) 176 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | testing/tools/run_javascript_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698