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

Unified Diff: scripts/slave/recipe_modules/path/example.py

Issue 1101673005: Extract functions from path recipe module so that step can depend on it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 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
Index: scripts/slave/recipe_modules/path/example.py
diff --git a/scripts/slave/recipe_modules/path/example.py b/scripts/slave/recipe_modules/path/example.py
index 72f243328c1cb48f30d4299cc2c92adf9d3476c5..c1c0b3e94743b5fa2dcb0b9ef1481ecbc67a6ec2 100644
--- a/scripts/slave/recipe_modules/path/example.py
+++ b/scripts/slave/recipe_modules/path/example.py
@@ -13,26 +13,10 @@ def GenSteps(api):
api.step('step1',
['/bin/echo', str(api.path['slave_build'].join('foo'))])
- # listdir demo.
- result = api.path.listdir('fake dir', '/fake/dir')
- for element in result:
- api.step('manipulate %s' % str(element), ['some', 'command'])
-
- # mkdtemp demo.
- for prefix in ('prefix_a', 'prefix_b'):
- # Create temp dir.
- temp_dir = api.path.mkdtemp(prefix)
- assert api.path.exists(temp_dir)
- # Make |temp_dir| surface in expectation files.
- api.step('print %s' % prefix, ['echo', temp_dir])
-
# module.resource(...) demo.
api.step('print resource',
['echo', api.path.resource('dir', 'file.py')])
- # rmwildcard demo
- api.path.rmwildcard('*.o', api.path['slave_build'])
-
def GenTests(api):
# This line is for code coverage.
« no previous file with comments | « scripts/slave/recipe_modules/path/api.py ('k') | scripts/slave/recipe_modules/path/example.expected/linux.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698