blob: 5e997308ea7260ef98fc4c431f2e7ad6bda196bc [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
def RunSteps(api):
# Prepare files.
temp = api.path.mkdtemp('zip-example')
api.step('touch a', ['touch', temp.join('a')])
api.step('touch b', ['touch', temp.join('b')])
api.file.ensure_directory('mkdirs', temp.join('sub', 'dir'))
api.step('touch c', ['touch', temp.join('sub', 'dir', 'c')])
# Build zip using ''.'zipping', temp, temp.join(''))
# Build a zip using ZipPackage api.
package =, temp.join(''))
package.add_directory(package.root.join('sub'))'zipping more')
# Coverage for 'output' property.
api.step('report', ['echo', package.output])
# Unzip the package.'unzipping', temp.join(''), temp.join('output'),
# List unzipped content.
with api.context(cwd=temp.join('output')):
api.step('listing', ['find'])
# Clean up.
api.file.rmtree('cleanup', temp)
def GenTests(api):
for platform in ('linux', 'win', 'mac'):
yield api.test(