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

Side by Side Diff: scripts/slave/recipe_modules/zip/example.py

Issue 2355483004: Add CIPD GAE SDK recipe module and packager. (Closed)
Patch Set: pylint Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 DEPS = [ 5 DEPS = [
6 'file', 6 'file',
7 'recipe_engine/path', 7 'recipe_engine/path',
8 'recipe_engine/platform', 8 'recipe_engine/platform',
9 'recipe_engine/step', 9 'recipe_engine/step',
10 'zip', 10 'zip',
(...skipping 14 matching lines...) Expand all
25 package = api.zip.make_package(temp, temp.join('more.zip')) 25 package = api.zip.make_package(temp, temp.join('more.zip'))
26 package.add_file(package.root.join('a')) 26 package.add_file(package.root.join('a'))
27 package.add_file(package.root.join('b')) 27 package.add_file(package.root.join('b'))
28 package.add_directory(package.root.join('sub')) 28 package.add_directory(package.root.join('sub'))
29 package.zip('zipping more') 29 package.zip('zipping more')
30 30
31 # Coverage for 'output' property. 31 # Coverage for 'output' property.
32 api.step('report', ['echo', package.output]) 32 api.step('report', ['echo', package.output])
33 33
34 # Unzip the package. 34 # Unzip the package.
35 api.zip.unzip('unzipping', temp.join('output.zip'), temp.join('output')) 35 api.zip.unzip('unzipping', temp.join('output.zip'), temp.join('output'),
36 quiet=True)
36 # List unzipped content. 37 # List unzipped content.
37 api.step('listing', ['find'], cwd=temp.join('output')) 38 api.step('listing', ['find'], cwd=temp.join('output'))
38 # Clean up. 39 # Clean up.
39 api.file.rmtree('cleanup', temp) 40 api.file.rmtree('cleanup', temp)
40 41
41 42
42 def GenTests(api): 43 def GenTests(api):
43 for platform in ('linux', 'win', 'mac'): 44 for platform in ('linux', 'win', 'mac'):
44 yield api.test(platform) + api.platform.name(platform) 45 yield api.test(platform) + api.platform.name(platform)
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/zip/api.py ('k') | scripts/slave/recipe_modules/zip/example.expected/linux.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698