summaryrefslogtreecommitdiff
path: root/testing/tools/gold.py
diff options
context:
space:
mode:
authorstephana <stephana@google.com>2017-01-13 13:16:40 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-13 13:16:40 -0800
commit38c2705c697cd9a67b02ead1d601610d7af96524 (patch)
tree434dc7672e680de8119ba24c44545be8dadd2d47 /testing/tools/gold.py
parent98d00b230aa14924dfde2eba3aaf69f86d18a45b (diff)
downloadpdfium-chromium/2983.tar.xz
Ensures that the gold output directory existschromium/2983chromium/2982chromium/2981
This will land after this CL https://chromium-review.googlesource.com/c/424575/ as a way of making sure it works as intended. TBR=borenet BUG=skia:5973 Review-Url: https://codereview.chromium.org/2629943002
Diffstat (limited to 'testing/tools/gold.py')
-rw-r--r--testing/tools/gold.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/tools/gold.py b/testing/tools/gold.py
index fda63b6deb..7598caffdc 100644
--- a/testing/tools/gold.py
+++ b/testing/tools/gold.py
@@ -67,6 +67,10 @@ class GoldResults(object):
self._results = []
self._outputDir = outputDir
+ # make sure the output directory exists.
+ if not os.path.exists(outputDir):
+ os.makedirs(outputDir)
+
def AddTestResult(self, testName, md5Hash, outputImagePath):
# Copy the image to <output_dir>/<md5Hash>.<image_extension>
imgExt = os.path.splitext(outputImagePath)[1].lstrip(".")