summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-19 14:54:59 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-19 14:54:59 -0800
commitd40e189ba1ab515ef9b3df7928e215be150df336 (patch)
tree27736f915341dc414617f995913a7f70ae245cbf
parenta41312c3237c4262ffbc2fa4375e4cbf59008f9a (diff)
downloadpdfium-d40e189ba1ab515ef9b3df7928e215be150df336.tar.xz
Hook up show-config to testing scripts.
R=ochang@chromium.org Review URL: https://codereview.chromium.org/1607923004 .
-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