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

Unified Diff: recipe_modules/file/example.disable

Issue 2993713003: Add file.filesizes to recipe engine core modules. (Closed)
Patch Set: Created 3 years, 4 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: recipe_modules/file/example.disable
diff --git a/recipe_modules/file/example.disable b/recipe_modules/file/example.disable
index 3cd41fad6d37274df12b60f554faecf754a18cb7..a27226968f40daa4d827acfbf3a251699c2b32b2 100644
--- a/recipe_modules/file/example.disable
+++ b/recipe_modules/file/example.disable
@@ -34,6 +34,12 @@ def RunSteps(api):
for element in result:
api.step('manipulate %s' % str(element), ['some', 'command'])
+ # filesizes demo.
+ filepaths = ['/fake/one', '/fake/other']
+ sizes = api.file.filesizes('filesizes', *filepaths)
+ for f, s in zip(filepaths, sizes):
+ api.step('filesize of %s is %d bytes' % (f, s))
+
# mkdtemp demo.
for prefix in ('prefix_a', 'prefix_b'):
# Create temp dir.
@@ -92,5 +98,6 @@ def RunSteps(api):
def GenTests(api):
- yield api.test('file_io') + api.file.listdir('other', ['aaa'])
-
+ yield (api.test('file_io')
+ + api.file.listdir('other', ['aaa'])
+ + api.file.filesizes([1, 44]))

Powered by Google App Engine
This is Rietveld 408576698