skia2/infra/bots/recipe_modules/vars
Oliver Newman c13cb6e624 Handle output placeholder missing backing file
In preparation for this CL:
https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/1777143

Currently, if no test step data is provided for a step that uses an
output placeholder, the placeholder evaluates to an empty string. After
that CL lands, the placeholder will instead evaluate to None, breaking
any non-mocked code that assumes a non-null placeholder result.

There were dozens of places where these env var fetches would've needed
mocking, so I figured it was easier to just silently handle the case
where the placeholder backing file doesn't exist. Especially for trivial
cases like these environment variable fetches where the backing file is
a temporary file created just for that step (no `leak_to` argument
specified), it should be impossible for the backing file to not exist
unless you're doing some really weird stuff.

Change-Id: Ibb646142ee8471b2444f54fe78c640a94d18a607
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240663
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-09-11 11:16:33 +00:00
..
examples Roll recipe dependencies (nontrivial). 2019-06-03 11:25:16 +00:00
__init__.py [skia] convert recipes and module to new context module 2017-05-15 13:46:22 +00:00
api.py Handle output placeholder missing backing file 2019-09-11 11:16:33 +00:00