diff options
author | tsepez <tsepez@chromium.org> | 2016-04-18 17:15:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-18 17:15:42 -0700 |
commit | 86d945b2d24edade9c7175be1c31b246f54b04ca (patch) | |
tree | 771654816efbe6e3b521814dd7208a3d605d5e88 /testing/tools/suppressor.py | |
parent | f09bdfa90d6324813309e987a07b28c1b75aec72 (diff) | |
download | pdfium-86d945b2d24edade9c7175be1c31b246f54b04ca.tar.xz |
Exclude XFA-only corpus from non-xfa and roll corpus.
Test still need modification to process input events. For now,
we just suppress anything that diffs.
Review URL: https://codereview.chromium.org/1894083003
Diffstat (limited to 'testing/tools/suppressor.py')
-rwxr-xr-x | testing/tools/suppressor.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/testing/tools/suppressor.py b/testing/tools/suppressor.py index a1c3171de1..b7629ef6f8 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 |