summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-19 15:05:36 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-19 15:05:36 -0800
commit5c1efd404f6f0c6bc190101fad3a9977c4e2e6d2 (patch)
tree418dd43cb03f6c00638e16d941164ab5e9cc195c
parentfd5f130ac81537c9066f5fb7998fdf08f501b40e (diff)
downloadpdfium-5c1efd404f6f0c6bc190101fad3a9977c4e2e6d2.tar.xz
Merge to XFA: Hook up show-config to testing scripts.
Review URL: https://codereview.chromium.org/1607923004 . (cherry picked from commit d40e189ba1ab515ef9b3df7928e215be150df336) TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1607113002 .
-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 f25db4564b..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", "xfa", self._ExtractSuppressions(f)))
+ common.os_name(), v8_option, xfa_option, self._ExtractSuppressions(f)))
def _ExtractSuppressions(self, f):
return [y.split(' ') for y in