From 6fac27d038697806aacdf1960e5a99eceda5ce31 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Tue, 27 Jun 2017 15:52:45 -0400 Subject: Change terminology of image diff to differentiate from pixel tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I957199b63f6049a586b8de2688501f5ae3449964 Reviewed-on: https://pdfium-review.googlesource.com/7038 Reviewed-by: Nicolás Peña Commit-Queue: Henrique Nakashima --- testing/SUPPRESSIONS_IMAGE_DIFF | 32 ++++++++++++++++++++++++++++++++ testing/SUPPRESSIONS_PIXEL | 32 -------------------------------- testing/tools/suppressor.py | 11 ++++++----- testing/tools/test_runner.py | 2 +- 4 files changed, 39 insertions(+), 38 deletions(-) create mode 100644 testing/SUPPRESSIONS_IMAGE_DIFF delete mode 100644 testing/SUPPRESSIONS_PIXEL diff --git a/testing/SUPPRESSIONS_IMAGE_DIFF b/testing/SUPPRESSIONS_IMAGE_DIFF new file mode 100644 index 0000000000..cdb2d66f93 --- /dev/null +++ b/testing/SUPPRESSIONS_IMAGE_DIFF @@ -0,0 +1,32 @@ +# Copyright 2017 The PDFium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# +# List of tests to have image diff tests skipped, one per line. +# There are four space-separated columns per line +# Each column (except column 0) can contain a comma-separated list of values. +# +# Column 0: test file name +# Column 1: platform: *, win, mac, linux +# Column 2: v8 support: *, nov8, v8 +# Column 3: xfa support: *, noxfa, xfa +# +# All columns on a line on a line must match, but filenames may be repeated +# on subsequent lines to suppress more cases. Within each column, any one of +# the comma-separated values must match in order for the colum to "match". +# The filenames and keywords are case-sensitive. +# +# Try to keep the file alphabetized within each category of test. + +# +# Corpus tests +# +FRC_3.5_CF_Strf_stmf_DefaultCryptFilter.pdf * * * +FRC_3.5_EncryptMetadata_T.pdf * * * +FRC_3.5_Encrypt_is_damage.pdf * * * +FRC_3.5_Filter_PubSec_SubFilter_s5.pdf * * * +FRC_3.5_Filter_PubSec_Sub_SubFilter_s4.pdf * * * +MouseEvents.pdf * * * +Oneof.pdf * * * +bug_651304.pdf * * * +outline.pdf * * * diff --git a/testing/SUPPRESSIONS_PIXEL b/testing/SUPPRESSIONS_PIXEL deleted file mode 100644 index d1a576500e..0000000000 --- a/testing/SUPPRESSIONS_PIXEL +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2017 The PDFium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -# -# List of tests to have pixel diff tests skipped, one per line. -# There are four space-separated columns per line -# Each column (except column 0) can contain a comma-separated list of values. -# -# Column 0: test file name -# Column 1: platform: *, win, mac, linux -# Column 2: v8 support: *, nov8, v8 -# Column 3: xfa support: *, noxfa, xfa -# -# All columns on a line on a line must match, but filenames may be repeated -# on subsequent lines to suppress more cases. Within each column, any one of -# the comma-separated values must match in order for the colum to "match". -# The filenames and keywords are case-sensitive. -# -# Try to keep the file alphabetized within each category of test. - -# -# Corpus tests -# -FRC_3.5_CF_Strf_stmf_DefaultCryptFilter.pdf * * * -FRC_3.5_EncryptMetadata_T.pdf * * * -FRC_3.5_Encrypt_is_damage.pdf * * * -FRC_3.5_Filter_PubSec_SubFilter_s5.pdf * * * -FRC_3.5_Filter_PubSec_Sub_SubFilter_s4.pdf * * * -MouseEvents.pdf * * * -Oneof.pdf * * * -bug_651304.pdf * * * -outline.pdf * * * diff --git a/testing/tools/suppressor.py b/testing/tools/suppressor.py index be03e21516..2b4b5d3f08 100755 --- a/testing/tools/suppressor.py +++ b/testing/tools/suppressor.py @@ -13,8 +13,9 @@ class Suppressor: self.has_v8 = "V8" in feature_vector self.has_xfa = "XFA" in feature_vector self.suppression_set = self._LoadSuppressedSet('SUPPRESSIONS', finder) - self.pixel_suppression_set = self._LoadSuppressedSet('SUPPRESSIONS_PIXEL', - finder) + self.image_suppression_set = self._LoadSuppressedSet( + 'SUPPRESSIONS_IMAGE_DIFF', + finder) def _LoadSuppressedSet(self, suppressions_filename, finder): v8_option = "v8" if self.has_v8 else "nov8" @@ -52,8 +53,8 @@ class Suppressor: return True return False - def IsPixelDiffSuppressed(self, input_filename): - if input_filename in self.pixel_suppression_set: - print "%s is pixel suppressed" % input_filename + def IsImageDiffSuppressed(self, input_filename): + if input_filename in self.image_suppression_set: + print "%s image diff comparison is suppressed" % input_filename return True return False diff --git a/testing/tools/test_runner.py b/testing/tools/test_runner.py index 81225b7de8..8f0670d33b 100644 --- a/testing/tools/test_runner.py +++ b/testing/tools/test_runner.py @@ -83,7 +83,7 @@ class TestRunner: return False, results else: if (self.enforce_expected_images - and not self.test_suppressor.IsPixelDiffSuppressed(input_filename)): + and not self.test_suppressor.IsImageDiffSuppressed(input_filename)): print 'FAILURE: %s; Missing expected images' % input_filename return False, results -- cgit v1.2.3