diff options
Diffstat (limited to 'testing/tools/suppressor.py')
-rwxr-xr-x | testing/tools/suppressor.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/testing/tools/suppressor.py b/testing/tools/suppressor.py index 3b2872df95..be03e21516 100755 --- a/testing/tools/suppressor.py +++ b/testing/tools/suppressor.py @@ -12,11 +12,15 @@ class Suppressor: feature_vector = feature_string.strip().split(",") 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) + + def _LoadSuppressedSet(self, suppressions_filename, finder): v8_option = "v8" if self.has_v8 else "nov8" xfa_option = "xfa" if self.has_xfa else "noxfa" - - with open(os.path.join(finder.TestingDir(), 'SUPPRESSIONS')) as f: - self.suppression_set = set(self._FilterSuppressions( + with open(os.path.join(finder.TestingDir(), suppressions_filename)) as f: + return set(self._FilterSuppressions( common.os_name(), v8_option, xfa_option, self._ExtractSuppressions(f))) def _ExtractSuppressions(self, f): @@ -47,3 +51,9 @@ class Suppressor: print "%s execution is suppressed" % input_filepath return True return False + + def IsPixelDiffSuppressed(self, input_filename): + if input_filename in self.pixel_suppression_set: + print "%s is pixel suppressed" % input_filename + return True + return False |