summaryrefslogtreecommitdiff
path: root/testing/tools/run_corpus_tests.py
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-12 09:27:46 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-12 09:27:46 -0700
commit7dac05808121e6ac40a9911e71e6391c88432a62 (patch)
tree8c085ef0384f85a75d36cf0f7c08fd45cb50c9ff /testing/tools/run_corpus_tests.py
parent5bba2b63759940ab2ac134bf376310e72b7adf47 (diff)
downloadpdfium-7dac05808121e6ac40a9911e71e6391c88432a62.tar.xz
Merge to XFA: Corpus tests check for unexpected successes.
Original Review URL: https://codereview.chromium.org/1178393002. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1184803002.
Diffstat (limited to 'testing/tools/run_corpus_tests.py')
-rwxr-xr-xtesting/tools/run_corpus_tests.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/testing/tools/run_corpus_tests.py b/testing/tools/run_corpus_tests.py
index 1876581e40..dbc8f35a91 100755
--- a/testing/tools/run_corpus_tests.py
+++ b/testing/tools/run_corpus_tests.py
@@ -55,6 +55,7 @@ def main():
# test files are under .../pdfium/testing/corpus.
failures = []
+ surprises = []
walk_from_dir = finder.TestingDir('corpus');
input_file_re = re.compile('^[a-zA-Z0-9_.]+[.]pdf$')
for source_dir, _, filename_list in os.walk(walk_from_dir):
@@ -62,11 +63,19 @@ def main():
if input_file_re.match(input_filename):
input_path = os.path.join(source_dir, input_filename)
if os.path.isfile(input_path):
+ result = test_one_file(input_filename, source_dir, working_dir,
+ pdfium_test_path, image_differ)
if test_suppressor.IsSuppressed(input_filename):
- continue
- if not test_one_file(input_filename, source_dir, working_dir,
- pdfium_test_path, image_differ):
- failures.append(input_path)
+ if result:
+ surprises.append(input_path)
+ else:
+ if not result:
+ failures.append(input_path)
+
+ if surprises:
+ print '\n\nUnexpected Successes:'
+ for surprise in surprises:
+ print surprise;
if failures:
print '\n\nSummary of Failures:'