summaryrefslogtreecommitdiff
path: root/testing/tools/common.py
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-20 05:54:14 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-20 05:54:14 -0700
commit84b26ec6ba8193235ce0df817dec5c0f1da29841 (patch)
tree25a61776bbfb914e024c30d496dcd1939e39f48f /testing/tools/common.py
parentb02012d565e2596c79c41c6fbf7f2ed88c4bbc51 (diff)
downloadpdfium-84b26ec6ba8193235ce0df817dec5c0f1da29841.tar.xz
Re-Reland Combined test runner.
Original Commit Message: This CL revives the old CL to combine the test runners [1] which was reverted due to failing font_size tests. I've deleted the font_size.pdf as it is not needed and for testing. Pixel tests are either .in or .pdf files, not both. Original description: This CL takes the three test runners (corpus, javascript, pixel) and combines the code into a single test_runner file. Each of the individual runners still exists and calls the test runner with their data directory. With this change, the pixel and javascript test will now run in parallel if multiple processors are available. 1-https://codereview.chromium.org/1430623006/ BUG= Review URL: https://codereview.chromium.org/1888673003
Diffstat (limited to 'testing/tools/common.py')
-rwxr-xr-xtesting/tools/common.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/testing/tools/common.py b/testing/tools/common.py
index 6e9de7c82c..ce292bf41f 100755
--- a/testing/tools/common.py
+++ b/testing/tools/common.py
@@ -18,6 +18,13 @@ def os_name():
raise Exception('Confused, can not determine OS, aborting.')
+def RunCommandToFile(cmd, file):
+ try:
+ subprocess.check_call(cmd, stdout=file)
+ return None
+ except subprocess.CalledProcessError as e:
+ return e
+
def RunCommand(cmd, redirect_output=False):
try:
if redirect_output:
@@ -28,6 +35,7 @@ def RunCommand(cmd, redirect_output=False):
except subprocess.CalledProcessError as e:
return e
+
# Adjust Dr. Memory wrapper to have separate log directory for each test
# for better error reporting.
def DrMemoryWrapper(wrapper, pdf_name):