summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtesting/tools/run_corpus_tests.py3
-rwxr-xr-xtesting/tools/run_javascript_tests.py5
-rwxr-xr-xtesting/tools/run_pixel_tests.py3
-rwxr-xr-xtesting/tools/suppressor.py7
4 files changed, 14 insertions, 4 deletions
diff --git a/testing/tools/run_corpus_tests.py b/testing/tools/run_corpus_tests.py
index e2b950c363..0c44cc6972 100755
--- a/testing/tools/run_corpus_tests.py
+++ b/testing/tools/run_corpus_tests.py
@@ -102,7 +102,8 @@ def main():
if not os.path.exists(working_dir):
os.makedirs(working_dir)
- test_suppressor = suppressor.Suppressor(finder)
+ feature_string = subprocess.check_output([pdfium_test_path, '--show-config'])
+ test_suppressor = suppressor.Suppressor(finder, feature_string)
image_differ = pngdiffer.PNGDiffer(finder)
# test files are under .../pdfium/testing/corpus.
diff --git a/testing/tools/run_javascript_tests.py b/testing/tools/run_javascript_tests.py
index 0c2401774e..b09ea49e78 100755
--- a/testing/tools/run_javascript_tests.py
+++ b/testing/tools/run_javascript_tests.py
@@ -63,6 +63,11 @@ def main():
if not os.path.exists(working_dir):
os.makedirs(working_dir)
+ feature_string = subprocess.check_output([pdfium_test_path, '--show-config'])
+ if "V8" not in feature_string.strip().split(","):
+ print "V8 not enabled, skipping."
+ return 0
+
input_files = []
if len(args):
for file_name in args:
diff --git a/testing/tools/run_pixel_tests.py b/testing/tools/run_pixel_tests.py
index 8d838402f9..8a102f4c42 100755
--- a/testing/tools/run_pixel_tests.py
+++ b/testing/tools/run_pixel_tests.py
@@ -70,7 +70,8 @@ def main():
if not os.path.exists(working_dir):
os.makedirs(working_dir)
- test_suppressor = suppressor.Suppressor(finder)
+ feature_string = subprocess.check_output([pdfium_test_path, '--show-config'])
+ test_suppressor = suppressor.Suppressor(finder, feature_string)
image_differ = pngdiffer.PNGDiffer(finder)
input_files = []
diff --git a/testing/tools/suppressor.py b/testing/tools/suppressor.py
index 7c74ed6281..a1c3171de1 100755
--- a/testing/tools/suppressor.py
+++ b/testing/tools/suppressor.py
@@ -8,10 +8,13 @@ import os
import common
class Suppressor:
- def __init__(self, finder):
+ 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]
with open(os.path.join(finder.TestingDir(), 'SUPPRESSIONS')) as f:
self.suppression_set = set(self._FilterSuppressions(
- common.os_name(), "v8", "noxfa", self._ExtractSuppressions(f)))
+ common.os_name(), v8_option, xfa_option, self._ExtractSuppressions(f)))
def _ExtractSuppressions(self, f):
return [y.split(' ') for y in