summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-18 17:15:42 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-18 17:15:42 -0700
commit86d945b2d24edade9c7175be1c31b246f54b04ca (patch)
tree771654816efbe6e3b521814dd7208a3d605d5e88
parentf09bdfa90d6324813309e987a07b28c1b75aec72 (diff)
downloadpdfium-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
-rw-r--r--DEPS2
-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
5 files changed, 30 insertions, 9 deletions
diff --git a/DEPS b/DEPS
index 425c71d6e3..265f452089 100644
--- a/DEPS
+++ b/DEPS
@@ -10,7 +10,7 @@ vars = {
'gmock_revision': '29763965ab52f24565299976b936d1265cb6a271',
'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038',
'icu_revision': 'c291cde264469b20ca969ce8832088acb21e0c48',
- 'pdfium_tests_revision': 'eb87214cb2088536e96aae517f3a281818fbf5b0',
+ 'pdfium_tests_revision': '7ef8719fac859e1d23d667d4c3038ae8b38e4d36',
'skia_revision': '0a291c7b7eea1807bd58bdaa60c258fd0ebeb257',
'trace_event_revision': 'd83d44b13d07c2fd0a40101a7deef9b93b841732',
'v8_revision': '47bcec782b752ba411bd8bba6e390d1cc1c3226e',
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