Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1048)

Unified Diff: recipe_modules/path/example.py

Issue 1906323003: recipe engine: extract infra-specific paths out of the engine (Closed) Base URL: https://github.com/luci/recipes-py.git@master
Patch Set: tmp Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « recipe_modules/path/config.py ('k') | recipe_modules/path/example.expected/linux.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/path/example.py
diff --git a/recipe_modules/path/example.py b/recipe_modules/path/example.py
index 429b2890791b125c28a05bfe09bc6eae4951c979..2c1d2666bb37da387385952ed82b9788e8388997 100644
--- a/recipe_modules/path/example.py
+++ b/recipe_modules/path/example.py
@@ -12,7 +12,7 @@ DEPS = [
from recipe_engine.config_types import Path
def RunSteps(api):
- api.step('step1', ['/bin/echo', str(api.path['slave_build'].join('foo'))])
+ api.step('step1', ['/bin/echo', str(api.path['tmp'].join('foo'))])
# module.resource(...) demo.
api.step('print resource',
@@ -26,7 +26,7 @@ def RunSteps(api):
dynamic_path = Path('[CHECKOUT]', 'jerky')
assert 'checkout' not in api.path
- api.path['checkout'] = api.path['slave_build'].join('checkout')
+ api.path['checkout'] = api.path['tmp'].join('checkout')
assert 'checkout' in api.path
api.step('checkout path', ['/bin/echo', dynamic_path])
@@ -34,12 +34,12 @@ def RunSteps(api):
# Methods from python os.path are available via api.path.
# For testing, we asserted that this file existed in the test description
# below.
- assert api.path.exists(api.path['slave_build'])
+ assert api.path.exists(api.path['tmp'])
temp_dir = api.path.mkdtemp('kawaab')
assert api.path.exists(temp_dir)
- file_path = api.path['slave_build'].join('new_file')
+ file_path = api.path['tmp'].join('new_file')
abspath = api.path.abspath(file_path)
api.path.assert_absolute(abspath)
@@ -53,16 +53,4 @@ def GenTests(api):
for platform in ('linux', 'win', 'mac'):
yield (api.test(platform) + api.platform.name(platform) +
# Test when a file already exists
- api.path.exists(api.path['slave_build']))
-
- # We have support for chromium swarming built in to the engine for some
- # reason. TODO(phajdan.jr) remove it.
- yield (api.test('%s_swarming' % platform) +
- api.platform.name(platform) +
- api.properties(path_config='swarming') +
- api.path.exists(api.path['slave_build']))
-
- yield (api.test('%s_kitchen' % platform) +
- api.platform.name(platform) +
- api.properties(path_config='kitchen') +
- api.path.exists(api.path['slave_build']))
+ api.path.exists(api.path['tmp']))
« no previous file with comments | « recipe_modules/path/config.py ('k') | recipe_modules/path/example.expected/linux.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698