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

Unified Diff: testing/tools/suppressor.py

Issue 1894083003: Exclude XFA-only corpus from non-xfa and roll corpus (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Tidy, print suppression msg. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/tools/run_pixel_tests.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/tools/suppressor.py
diff --git a/testing/tools/suppressor.py b/testing/tools/suppressor.py
index a1c3171de11413d08fccd51d9b15fa64c865f208..b7629ef6f8c749860880658e94520081f14e4cbc 100755
--- a/testing/tools/suppressor.py
+++ b/testing/tools/suppressor.py
@@ -10,8 +10,10 @@ import common
class Suppressor:
def __init__(self, finder, feature_string):
feature_vector = feature_string.strip().split(",")
- v8_option = ["nov8", "v8"]["V8" in feature_vector]
- xfa_option = ["noxfa", "xfa"]["XFA" in feature_vector]
+ self.has_v8 = "V8" in feature_vector
+ self.has_xfa = "XFA" in feature_vector
+ 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(
common.os_name(), v8_option, xfa_option, self._ExtractSuppressions(f)))
@@ -33,8 +35,14 @@ class Suppressor:
('*' in js_column or js in js_column) and
('*' in xfa_column or xfa in xfa_column))
- def IsSuppressed(self, input_filename):
+ def IsResultSuppressed(self, input_filename):
if input_filename in self.suppression_set:
- print "%s is suppressed" % input_filename
+ print "%s result is suppressed" % input_filename
+ return True
+ return False
+
+ def IsExecutionSuppressed(self, input_filepath):
+ if "xfa_specific" in input_filepath and not self.has_xfa:
+ print "%s execution is suppressed" % input_filepath
return True
return False
« no previous file with comments | « testing/tools/run_pixel_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698