Index: recipe_modules/infra_paths/example.py |
diff --git a/recipe_modules/infra_paths/example.py b/recipe_modules/infra_paths/example.py |
index 9e6f712faa03f8329cc67480364f801ab30b18bd..f55bf058be549a5984cac164cf0716b0dfccfeab 100644 |
--- a/recipe_modules/infra_paths/example.py |
+++ b/recipe_modules/infra_paths/example.py |
@@ -4,6 +4,7 @@ |
DEPS = [ |
'infra_paths', |
+ 'recipe_engine/path', |
'recipe_engine/platform', |
'recipe_engine/properties', |
'recipe_engine/step', |
@@ -14,10 +15,16 @@ from recipe_engine.config_types import Path |
def RunSteps(api): |
api.step('step', [], cwd=api.infra_paths['slave_build']) |
+ if api.path.exists(api.infra_paths['slave_build'].join('foo.txt')): |
+ api.step('path exists', []) |
Michael Achenbach
2016/04/26 13:22:23
Maybe also demonstrate a path that doesn't exist.
Paweł Hajdan Jr.
2016/04/26 13:23:25
We do. We have tests (*_kitchen) where it doesn't
Michael Achenbach
2016/04/26 13:26:09
Fair enough. An "does not exist" line would also s
|
+ |
def GenTests(api): |
for platform in ('linux', 'win', 'mac'): |
- yield (api.test(platform) + api.platform.name(platform)) |
+ yield (api.test(platform) + |
+ api.platform.name(platform) + |
+ api.infra_paths.exists( |
+ api.infra_paths['slave_build'].join('foo.txt'))) |
yield (api.test('%s_kitchen' % platform) + |
api.platform.name(platform) + |