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

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

Issue 1946873004: Fix event sending in pdfium_test. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Same thing in test_runner.py Created 4 years, 7 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_corpus_tests.py ('k') | no next file » | 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 2016 The PDFium Authors. All rights reserved. 2 # Copyright 2016 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 cmd_to_run = common.DrMemoryWrapper(self.drmem_wrapper, input_root) 84 cmd_to_run = common.DrMemoryWrapper(self.drmem_wrapper, input_root)
85 cmd_to_run.extend([self.pdfium_test_path, pdf_path]) 85 cmd_to_run.extend([self.pdfium_test_path, pdf_path])
86 subprocess.check_call(cmd_to_run, stdout=outfile) 86 subprocess.check_call(cmd_to_run, stdout=outfile)
87 87
88 cmd = [sys.executable, self.text_diff_path, expected_txt_path, txt_path] 88 cmd = [sys.executable, self.text_diff_path, expected_txt_path, txt_path]
89 return common.RunCommand(cmd) 89 return common.RunCommand(cmd)
90 90
91 91
92 def TestPixel(self, input_root, pdf_path): 92 def TestPixel(self, input_root, pdf_path):
93 cmd_to_run = common.DrMemoryWrapper(self.drmem_wrapper, input_root) 93 cmd_to_run = common.DrMemoryWrapper(self.drmem_wrapper, input_root)
94 cmd_to_run.extend([self.pdfium_test_path, '--png', pdf_path]) 94 cmd_to_run.extend([self.pdfium_test_path, '--send-events', '--png',
95 pdf_path])
95 return common.RunCommand(cmd_to_run) 96 return common.RunCommand(cmd_to_run)
96 97
97 98
98 def HandleResult(self, input_filename, input_path, result): 99 def HandleResult(self, input_filename, input_path, result):
99 if self.test_suppressor.IsResultSuppressed(input_filename): 100 if self.test_suppressor.IsResultSuppressed(input_filename):
100 if result: 101 if result:
101 self.surprises.append(input_path) 102 self.surprises.append(input_path)
102 else: 103 else:
103 if not result: 104 if not result:
104 self.failures.append(input_path) 105 self.failures.append(input_path)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 print surprise; 178 print surprise;
178 179
179 if self.failures: 180 if self.failures:
180 self.failures.sort() 181 self.failures.sort()
181 print '\n\nSummary of Failures:' 182 print '\n\nSummary of Failures:'
182 for failure in self.failures: 183 for failure in self.failures:
183 print failure 184 print failure
184 return 1 185 return 1
185 186
186 return 0 187 return 0
OLDNEW
« no previous file with comments | « testing/tools/run_corpus_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698