summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/SUPPRESSIONS12
-rwxr-xr-xtesting/tools/run_corpus_tests.py7
-rwxr-xr-xtesting/tools/run_pixel_tests.py2
-rwxr-xr-xtesting/tools/suppressor.py16
4 files changed, 29 insertions, 8 deletions
diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
index 7aca89d024..3717f75c3a 100644
--- a/testing/SUPPRESSIONS
+++ b/testing/SUPPRESSIONS
@@ -477,3 +477,15 @@ widget_javascript.pdf mac * *
zh_file1.pdf mac * *
zh_function_list.pdf mac * *
zh_shared_document.pdf mac * *
+
+#
+# xfa_specific
+#
+Choose.pdf * * *
+data_binding.pdf * * *
+Date_FormCale.pdf * * *
+Sum.pdf * * *
+TimeField.pdf * * *
+Test_CheckBox.pdf * * *
+Test_DateField_locale_zh_HK.pdf * * *
+
diff --git a/testing/tools/run_corpus_tests.py b/testing/tools/run_corpus_tests.py
index 0c44cc6972..82c3d2aefe 100755
--- a/testing/tools/run_corpus_tests.py
+++ b/testing/tools/run_corpus_tests.py
@@ -74,7 +74,7 @@ def test_one_file_parallel(working_dir, pdfium_test_path, image_differ,
def handle_result(test_suppressor, input_filename, input_path, result,
surprises, failures):
- if test_suppressor.IsSuppressed(input_filename):
+ if test_suppressor.IsResultSuppressed(input_filename):
if result:
surprises.append(input_path)
else:
@@ -127,8 +127,9 @@ def main():
for input_filename in filename_list:
if input_file_re.match(input_filename):
input_path = os.path.join(source_dir, input_filename)
- if os.path.isfile(input_path):
- test_cases.append((input_filename, source_dir))
+ if not test_suppressor.IsExecutionSuppressed(input_path):
+ if os.path.isfile(input_path):
+ test_cases.append((input_filename, source_dir))
if options.num_workers > 1 and len(test_cases) > 1:
try:
diff --git a/testing/tools/run_pixel_tests.py b/testing/tools/run_pixel_tests.py
index e2066e4811..1595ef7e45 100755
--- a/testing/tools/run_pixel_tests.py
+++ b/testing/tools/run_pixel_tests.py
@@ -90,7 +90,7 @@ def main():
if input_file_re.match(input_filename):
input_path = os.path.join(source_dir, input_filename)
if os.path.isfile(input_path):
- if test_suppressor.IsSuppressed(input_filename):
+ if test_suppressor.IsResultSuppressed(input_filename):
continue
if not generate_and_test(input_filename, source_dir, working_dir,
fixup_path, pdfium_test_path, image_differ,
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