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

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

Issue 1607923004: Hook up show-config to testing scripts. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits 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 | « testing/tools/run_javascript_tests.py ('k') | testing/tools/suppressor.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 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 source_dir = finder.TestingDir(os.path.join('resources', 'pixel')) 63 source_dir = finder.TestingDir(os.path.join('resources', 'pixel'))
64 pdfium_test_path = finder.ExecutablePath('pdfium_test') 64 pdfium_test_path = finder.ExecutablePath('pdfium_test')
65 if not os.path.exists(pdfium_test_path): 65 if not os.path.exists(pdfium_test_path):
66 print "FAILURE: Can't find test executable '%s'" % pdfium_test_path 66 print "FAILURE: Can't find test executable '%s'" % pdfium_test_path
67 print "Use --build-dir to specify its location." 67 print "Use --build-dir to specify its location."
68 return 1 68 return 1
69 working_dir = finder.WorkingDir(os.path.join('testing', 'pixel')) 69 working_dir = finder.WorkingDir(os.path.join('testing', 'pixel'))
70 if not os.path.exists(working_dir): 70 if not os.path.exists(working_dir):
71 os.makedirs(working_dir) 71 os.makedirs(working_dir)
72 72
73 test_suppressor = suppressor.Suppressor(finder) 73 feature_string = subprocess.check_output([pdfium_test_path, '--show-config'])
74 test_suppressor = suppressor.Suppressor(finder, feature_string)
74 image_differ = pngdiffer.PNGDiffer(finder) 75 image_differ = pngdiffer.PNGDiffer(finder)
75 76
76 input_files = [] 77 input_files = []
77 if len(args): 78 if len(args):
78 for file_name in args: 79 for file_name in args:
79 input_files.append(file_name.replace(".pdf", ".in")) 80 input_files.append(file_name.replace(".pdf", ".in"))
80 else: 81 else:
81 input_files = os.listdir(source_dir) 82 input_files = os.listdir(source_dir)
82 83
83 failures = [] 84 failures = []
(...skipping 13 matching lines...) Expand all
97 failures.sort() 98 failures.sort()
98 print '\n\nSummary of Failures:' 99 print '\n\nSummary of Failures:'
99 for failure in failures: 100 for failure in failures:
100 print failure 101 print failure
101 return 1 102 return 1
102 return 0 103 return 0
103 104
104 105
105 if __name__ == '__main__': 106 if __name__ == '__main__':
106 sys.exit(main()) 107 sys.exit(main())
OLDNEW
« no previous file with comments | « testing/tools/run_javascript_tests.py ('k') | testing/tools/suppressor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698