blob: 82b53db96213d75bcc364066c281e97cfaaa9cae [file] [log] [blame]
Mike Frysingere58c0e22017-10-04 15:43:30 -04001# -*- coding: utf-8 -*-
Ryan Cuiafd6c5c2012-07-30 17:48:22 -07002# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
Steve Funge984a532013-11-25 17:09:25 -08006"""Unit tests for the deploy_chrome script."""
Ryan Cuiafd6c5c2012-07-30 17:48:22 -07007
Mike Frysinger383367e2014-09-16 15:06:17 -04008from __future__ import print_function
9
Mike Frysingerea838d12014-12-08 11:55:32 -050010import mock
Ryan Cuiafd6c5c2012-07-30 17:48:22 -070011import os
David James88e6f032013-03-02 08:13:20 -080012import time
Ryan Cuiafd6c5c2012-07-30 17:48:22 -070013
David Pursellcfd58872015-03-19 09:15:48 -070014from chromite.cli.cros import cros_chrome_sdk_unittest
Ryan Cuief91e702013-02-04 12:06:36 -080015from chromite.lib import chrome_util
Ryan Cuiafd6c5c2012-07-30 17:48:22 -070016from chromite.lib import cros_build_lib
17from chromite.lib import cros_test_lib
Ryan Cui686ec052013-02-12 16:39:41 -080018from chromite.lib import osutils
Ryan Cuiafd6c5c2012-07-30 17:48:22 -070019from chromite.lib import partial_mock
Robert Flack1dc7ea82014-11-26 13:50:24 -050020from chromite.lib import remote_access
Ryan Cuiafd6c5c2012-07-30 17:48:22 -070021from chromite.lib import remote_access_unittest
22from chromite.scripts import deploy_chrome
23
Ryan Cuief91e702013-02-04 12:06:36 -080024
Mike Frysinger27e21b72018-07-12 14:20:21 -040025# pylint: disable=protected-access
26
Ryan Cuiafd6c5c2012-07-30 17:48:22 -070027
28_REGULAR_TO = ('--to', 'monkey')
29_GS_PATH = 'gs://foon'
30
31
32def _ParseCommandLine(argv):
33 return deploy_chrome._ParseCommandLine(['--log-level', 'debug'] + argv)
34
35
36class InterfaceTest(cros_test_lib.OutputTestCase):
37 """Tests the commandline interface of the script."""
38
Bernie Thompson93b9ee62018-02-21 14:56:16 -080039 BOARD = 'eve'
Ryan Cui686ec052013-02-12 16:39:41 -080040
Ryan Cuiafd6c5c2012-07-30 17:48:22 -070041 def testGsLocalPathUnSpecified(self):
42 """Test no chrome path specified."""
43 with self.OutputCapturer():
44 self.assertRaises2(SystemExit, _ParseCommandLine, list(_REGULAR_TO),
45 check_attrs={'code': 2})
46
47 def testGsPathSpecified(self):
48 """Test case of GS path specified."""
49 argv = list(_REGULAR_TO) + ['--gs-path', _GS_PATH]
50 _ParseCommandLine(argv)
51
52 def testLocalPathSpecified(self):
53 """Test case of local path specified."""
Mike Frysingerd6e2df02014-11-26 02:55:04 -050054 argv = list(_REGULAR_TO) + ['--local-pkg-path', '/path/to/chrome']
Ryan Cuiafd6c5c2012-07-30 17:48:22 -070055 _ParseCommandLine(argv)
56
57 def testNoTarget(self):
58 """Test no target specified."""
59 argv = ['--gs-path', _GS_PATH]
Ryan Cuief91e702013-02-04 12:06:36 -080060 self.assertParseError(argv)
61
62 def assertParseError(self, argv):
Ryan Cuiafd6c5c2012-07-30 17:48:22 -070063 with self.OutputCapturer():
64 self.assertRaises2(SystemExit, _ParseCommandLine, argv,
65 check_attrs={'code': 2})
66
Achuith Bhandarkar31a3eb02018-03-22 16:33:48 -070067 def testNoBoard(self):
68 """Test cases where --board is not specified."""
Ryan Cui686ec052013-02-12 16:39:41 -080069 argv = ['--staging-only', '--build-dir=/path/to/nowhere']
70 self.assertParseError(argv)
71
Achuith Bhandarkar31a3eb02018-03-22 16:33:48 -070072 # Don't need --board if no stripping is necessary.
73 argv_nostrip = argv + ['--nostrip']
74 _ParseCommandLine(argv_nostrip)
75
76 # Don't need --board if strip binary is provided.
77 argv_strip_bin = argv + ['--strip-bin', 'strip.bin']
78 _ParseCommandLine(argv_strip_bin)
79
Thiago Goncales12793312013-05-23 11:26:17 -070080 def testMountOptionSetsTargetDir(self):
81 argv = list(_REGULAR_TO) + ['--gs-path', _GS_PATH, '--mount']
Mike Frysingerc3061a62015-06-04 04:16:18 -040082 options = _ParseCommandLine(argv)
Thiago Goncales12793312013-05-23 11:26:17 -070083 self.assertIsNot(options.target_dir, None)
84
85 def testMountOptionSetsMountDir(self):
86 argv = list(_REGULAR_TO) + ['--gs-path', _GS_PATH, '--mount']
Mike Frysingerc3061a62015-06-04 04:16:18 -040087 options = _ParseCommandLine(argv)
Thiago Goncales12793312013-05-23 11:26:17 -070088 self.assertIsNot(options.mount_dir, None)
89
90 def testMountOptionDoesNotOverrideTargetDir(self):
91 argv = list(_REGULAR_TO) + ['--gs-path', _GS_PATH, '--mount',
92 '--target-dir', '/foo/bar/cow']
Mike Frysingerc3061a62015-06-04 04:16:18 -040093 options = _ParseCommandLine(argv)
Thiago Goncales12793312013-05-23 11:26:17 -070094 self.assertEqual(options.target_dir, '/foo/bar/cow')
95
96 def testMountOptionDoesNotOverrideMountDir(self):
97 argv = list(_REGULAR_TO) + ['--gs-path', _GS_PATH, '--mount',
98 '--mount-dir', '/foo/bar/cow']
Mike Frysingerc3061a62015-06-04 04:16:18 -040099 options = _ParseCommandLine(argv)
Thiago Goncales12793312013-05-23 11:26:17 -0700100 self.assertEqual(options.mount_dir, '/foo/bar/cow')
101
Adrian Eldera2c548a2017-11-07 19:01:29 -0500102 def testSshIdentityOptionSetsOption(self):
103 argv = list(_REGULAR_TO) + ['--private-key', '/foo/bar/key',
104 '--board', 'cedar',
Bernie Thompson93b9ee62018-02-21 14:56:16 -0800105 '--build-dir', '/path/to/nowhere']
Adrian Eldera2c548a2017-11-07 19:01:29 -0500106 options = _ParseCommandLine(argv)
107 self.assertEqual(options.private_key, '/foo/bar/key')
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700108
109class DeployChromeMock(partial_mock.PartialMock):
Steve Funge984a532013-11-25 17:09:25 -0800110 """Deploy Chrome Mock Class."""
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700111
112 TARGET = 'chromite.scripts.deploy_chrome.DeployChrome'
David James88e6f032013-03-02 08:13:20 -0800113 ATTRS = ('_KillProcsIfNeeded', '_DisableRootfsVerification')
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700114
David James88e6f032013-03-02 08:13:20 -0800115 def __init__(self):
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700116 partial_mock.PartialMock.__init__(self)
Robert Flack1dc7ea82014-11-26 13:50:24 -0500117 self.remote_device_mock = remote_access_unittest.RemoteDeviceMock()
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700118 # Target starts off as having rootfs verification enabled.
Ryan Cuie18f24f2012-12-03 18:39:55 -0800119 self.rsh_mock = remote_access_unittest.RemoteShMock()
David James88e6f032013-03-02 08:13:20 -0800120 self.rsh_mock.SetDefaultCmdResult(0)
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700121 self.MockMountCmd(1)
David Haddock3151d912017-10-24 03:50:32 +0000122 self.rsh_mock.AddCmdResult(
123 deploy_chrome.LSOF_COMMAND % (deploy_chrome._CHROME_DIR,), 1)
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700124
125 def MockMountCmd(self, returnvalue):
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700126 self.rsh_mock.AddCmdResult(deploy_chrome.MOUNT_RW_COMMAND,
David James88e6f032013-03-02 08:13:20 -0800127 returnvalue)
128
129 def _DisableRootfsVerification(self, inst):
130 with mock.patch.object(time, 'sleep'):
131 self.backup['_DisableRootfsVerification'](inst)
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700132
Ryan Cui4d6fca92012-12-13 16:41:56 -0800133 def PreStart(self):
Robert Flack1dc7ea82014-11-26 13:50:24 -0500134 self.remote_device_mock.start()
Ryan Cui4d6fca92012-12-13 16:41:56 -0800135 self.rsh_mock.start()
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700136
Ryan Cui4d6fca92012-12-13 16:41:56 -0800137 def PreStop(self):
138 self.rsh_mock.stop()
Robert Flack1dc7ea82014-11-26 13:50:24 -0500139 self.remote_device_mock.stop()
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700140
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700141 def _KillProcsIfNeeded(self, _inst):
142 # Fully stub out for now.
143 pass
144
145
Ryan Cuief91e702013-02-04 12:06:36 -0800146class DeployTest(cros_test_lib.MockTempDirTestCase):
Steve Funge984a532013-11-25 17:09:25 -0800147 """Setup a deploy object with a GS-path for use in tests."""
148
Ryan Cuief91e702013-02-04 12:06:36 -0800149 def _GetDeployChrome(self, args):
Mike Frysingerc3061a62015-06-04 04:16:18 -0400150 options = _ParseCommandLine(args)
Ryan Cuia56a71e2012-10-18 18:40:35 -0700151 return deploy_chrome.DeployChrome(
152 options, self.tempdir, os.path.join(self.tempdir, 'staging'))
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700153
154 def setUp(self):
Ryan Cuif1416f32013-01-22 18:43:41 -0800155 self.deploy_mock = self.StartPatcher(DeployChromeMock())
Ryan Cuief91e702013-02-04 12:06:36 -0800156 self.deploy = self._GetDeployChrome(
David James88e6f032013-03-02 08:13:20 -0800157 list(_REGULAR_TO) + ['--gs-path', _GS_PATH, '--force'])
Luigi Semenzato1bc79b22016-11-22 16:32:17 -0800158 self.remote_reboot_mock = \
159 self.PatchObject(remote_access.RemoteAccess, 'RemoteReboot',
160 return_value=True)
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700161
David James88e6f032013-03-02 08:13:20 -0800162class TestDisableRootfsVerification(DeployTest):
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700163 """Testing disabling of rootfs verification and RO mode."""
164
David James88e6f032013-03-02 08:13:20 -0800165 def testDisableRootfsVerificationSuccess(self):
166 """Test the working case, disabling rootfs verification."""
167 self.deploy_mock.MockMountCmd(0)
168 self.deploy._DisableRootfsVerification()
Steven Bennettsca73efa2018-07-10 13:36:56 -0700169 self.assertFalse(self.deploy._root_dir_is_still_readonly.is_set())
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700170
171 def testDisableRootfsVerificationFailure(self):
172 """Test failure to disable rootfs verification."""
Mike Frysinger27e21b72018-07-12 14:20:21 -0400173 # pylint: disable=unused-argument
Shuqian Zhao14e61092017-11-17 00:02:16 +0000174 def RaiseRunCommandError(timeout_sec=None):
Luigi Semenzato1bc79b22016-11-22 16:32:17 -0800175 raise cros_build_lib.RunCommandError('Mock RunCommandError', 0)
176 self.remote_reboot_mock.side_effect = RaiseRunCommandError
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700177 self.assertRaises(cros_build_lib.RunCommandError,
David James88e6f032013-03-02 08:13:20 -0800178 self.deploy._DisableRootfsVerification)
Luigi Semenzato1bc79b22016-11-22 16:32:17 -0800179 self.remote_reboot_mock.side_effect = None
Steven Bennettsca73efa2018-07-10 13:36:56 -0700180 self.assertFalse(self.deploy._root_dir_is_still_readonly.is_set())
David James88e6f032013-03-02 08:13:20 -0800181
182
183class TestMount(DeployTest):
184 """Testing mount success and failure."""
185
186 def testSuccess(self):
187 """Test case where we are able to mount as writable."""
Steven Bennettsca73efa2018-07-10 13:36:56 -0700188 self.assertFalse(self.deploy._root_dir_is_still_readonly.is_set())
David James88e6f032013-03-02 08:13:20 -0800189 self.deploy_mock.MockMountCmd(0)
190 self.deploy._MountRootfsAsWritable()
Steven Bennettsca73efa2018-07-10 13:36:56 -0700191 self.assertFalse(self.deploy._root_dir_is_still_readonly.is_set())
David James88e6f032013-03-02 08:13:20 -0800192
193 def testMountError(self):
194 """Test that mount failure doesn't raise an exception by default."""
Steven Bennettsca73efa2018-07-10 13:36:56 -0700195 self.assertFalse(self.deploy._root_dir_is_still_readonly.is_set())
Mike Frysinger74ccd572015-05-21 21:18:20 -0400196 self.PatchObject(remote_access.RemoteDevice, 'IsDirWritable',
Robert Flack1dc7ea82014-11-26 13:50:24 -0500197 return_value=False, autospec=True)
David James88e6f032013-03-02 08:13:20 -0800198 self.deploy._MountRootfsAsWritable()
Steven Bennettsca73efa2018-07-10 13:36:56 -0700199 self.assertTrue(self.deploy._root_dir_is_still_readonly.is_set())
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700200
201 def testMountRwFailure(self):
David James88e6f032013-03-02 08:13:20 -0800202 """Test that mount failure raises an exception if error_code_ok=False."""
203 self.assertRaises(cros_build_lib.RunCommandError,
204 self.deploy._MountRootfsAsWritable, error_code_ok=False)
Steven Bennettsca73efa2018-07-10 13:36:56 -0700205 self.assertFalse(self.deploy._root_dir_is_still_readonly.is_set())
Robert Flack1dc7ea82014-11-26 13:50:24 -0500206
207 def testMountTempDir(self):
208 """Test that mount succeeds if target dir is writable."""
Steven Bennettsca73efa2018-07-10 13:36:56 -0700209 self.assertFalse(self.deploy._root_dir_is_still_readonly.is_set())
Mike Frysinger74ccd572015-05-21 21:18:20 -0400210 self.PatchObject(remote_access.RemoteDevice, 'IsDirWritable',
Robert Flack1dc7ea82014-11-26 13:50:24 -0500211 return_value=True, autospec=True)
212 self.deploy._MountRootfsAsWritable()
Steven Bennettsca73efa2018-07-10 13:36:56 -0700213 self.assertFalse(self.deploy._root_dir_is_still_readonly.is_set())
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700214
215
Ryan Cuief91e702013-02-04 12:06:36 -0800216class TestUiJobStarted(DeployTest):
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700217 """Test detection of a running 'ui' job."""
218
Ryan Cuif2d1a582013-02-19 14:08:13 -0800219 def MockStatusUiCmd(self, **kwargs):
David Haddock3151d912017-10-24 03:50:32 +0000220 self.deploy_mock.rsh_mock.AddCmdResult('status ui', **kwargs)
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700221
222 def testUiJobStartedFalse(self):
223 """Correct results with a stopped job."""
Ryan Cuif2d1a582013-02-19 14:08:13 -0800224 self.MockStatusUiCmd(output='ui stop/waiting')
225 self.assertFalse(self.deploy._CheckUiJobStarted())
226
227 def testNoUiJob(self):
228 """Correct results when the job doesn't exist."""
229 self.MockStatusUiCmd(error='start: Unknown job: ui', returncode=1)
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700230 self.assertFalse(self.deploy._CheckUiJobStarted())
231
232 def testCheckRootfsWriteableTrue(self):
233 """Correct results with a running job."""
Ryan Cuif2d1a582013-02-19 14:08:13 -0800234 self.MockStatusUiCmd(output='ui start/running, process 297')
Ryan Cuiafd6c5c2012-07-30 17:48:22 -0700235 self.assertTrue(self.deploy._CheckUiJobStarted())
236
237
Ryan Cuief91e702013-02-04 12:06:36 -0800238class StagingTest(cros_test_lib.MockTempDirTestCase):
239 """Test user-mode and ebuild-mode staging functionality."""
240
241 def setUp(self):
Ryan Cuief91e702013-02-04 12:06:36 -0800242 self.staging_dir = os.path.join(self.tempdir, 'staging')
243 self.build_dir = os.path.join(self.tempdir, 'build_dir')
Ryan Cui686ec052013-02-12 16:39:41 -0800244 self.common_flags = ['--build-dir', self.build_dir,
Bernie Thompson93b9ee62018-02-21 14:56:16 -0800245 '--board=eve', '--staging-only', '--cache-dir',
Ryan Cui686ec052013-02-12 16:39:41 -0800246 self.tempdir]
Ryan Cuia0215a72013-02-14 16:20:45 -0800247 self.sdk_mock = self.StartPatcher(cros_chrome_sdk_unittest.SDKFetcherMock())
Ryan Cui686ec052013-02-12 16:39:41 -0800248 self.PatchObject(
249 osutils, 'SourceEnvironment', autospec=True,
250 return_value={'STRIP': 'x86_64-cros-linux-gnu-strip'})
Ryan Cuief91e702013-02-04 12:06:36 -0800251
David Jamesa6e08892013-03-01 13:34:11 -0800252 def testSingleFileDeployFailure(self):
253 """Default staging enforces that mandatory files are copied"""
Mike Frysingerc3061a62015-06-04 04:16:18 -0400254 options = _ParseCommandLine(self.common_flags)
David Jamesa6e08892013-03-01 13:34:11 -0800255 osutils.Touch(os.path.join(self.build_dir, 'chrome'), makedirs=True)
256 self.assertRaises(
257 chrome_util.MissingPathError, deploy_chrome._PrepareStagingDir,
Daniel Eratc89829c2014-05-12 17:24:21 -0700258 options, self.tempdir, self.staging_dir, chrome_util._COPY_PATHS_CHROME)
Ryan Cuief91e702013-02-04 12:06:36 -0800259
David Jamesa6e08892013-03-01 13:34:11 -0800260 def testSloppyDeployFailure(self):
261 """Sloppy staging enforces that at least one file is copied."""
Mike Frysingerc3061a62015-06-04 04:16:18 -0400262 options = _ParseCommandLine(self.common_flags + ['--sloppy'])
David Jamesa6e08892013-03-01 13:34:11 -0800263 self.assertRaises(
264 chrome_util.MissingPathError, deploy_chrome._PrepareStagingDir,
Daniel Eratc89829c2014-05-12 17:24:21 -0700265 options, self.tempdir, self.staging_dir, chrome_util._COPY_PATHS_CHROME)
David Jamesa6e08892013-03-01 13:34:11 -0800266
267 def testSloppyDeploySuccess(self):
268 """Sloppy staging - stage one file."""
Mike Frysingerc3061a62015-06-04 04:16:18 -0400269 options = _ParseCommandLine(self.common_flags + ['--sloppy'])
David Jamesa6e08892013-03-01 13:34:11 -0800270 osutils.Touch(os.path.join(self.build_dir, 'chrome'), makedirs=True)
Steve Funge984a532013-11-25 17:09:25 -0800271 deploy_chrome._PrepareStagingDir(options, self.tempdir, self.staging_dir,
Daniel Eratc89829c2014-05-12 17:24:21 -0700272 chrome_util._COPY_PATHS_CHROME)
David Jamesa6e08892013-03-01 13:34:11 -0800273
Steve Funge984a532013-11-25 17:09:25 -0800274
275class DeployTestBuildDir(cros_test_lib.MockTempDirTestCase):
Daniel Erat1ae46382014-08-14 10:23:39 -0700276 """Set up a deploy object with a build-dir for use in deployment type tests"""
Steve Funge984a532013-11-25 17:09:25 -0800277
278 def _GetDeployChrome(self, args):
Mike Frysingerc3061a62015-06-04 04:16:18 -0400279 options = _ParseCommandLine(args)
Steve Funge984a532013-11-25 17:09:25 -0800280 return deploy_chrome.DeployChrome(
281 options, self.tempdir, os.path.join(self.tempdir, 'staging'))
282
283 def setUp(self):
284 self.staging_dir = os.path.join(self.tempdir, 'staging')
285 self.build_dir = os.path.join(self.tempdir, 'build_dir')
286 self.deploy_mock = self.StartPatcher(DeployChromeMock())
287 self.deploy = self._GetDeployChrome(
288 list(_REGULAR_TO) + ['--build-dir', self.build_dir,
Bernie Thompson93b9ee62018-02-21 14:56:16 -0800289 '--board=eve', '--staging-only', '--cache-dir',
Steve Funge984a532013-11-25 17:09:25 -0800290 self.tempdir, '--sloppy'])
291
Daniel Erat1ae46382014-08-14 10:23:39 -0700292 def getCopyPath(self, source_path):
293 """Return a chrome_util.Path or None if not present."""
294 paths = [p for p in self.deploy.copy_paths if p.src == source_path]
295 return paths[0] if paths else None
Steve Funge984a532013-11-25 17:09:25 -0800296
Daniel Erat1ae46382014-08-14 10:23:39 -0700297class TestDeploymentType(DeployTestBuildDir):
Steve Funge984a532013-11-25 17:09:25 -0800298 """Test detection of deployment type using build dir."""
299
Daniel Erat1ae46382014-08-14 10:23:39 -0700300 def testAppShellDetection(self):
301 """Check for an app_shell deployment"""
302 osutils.Touch(os.path.join(self.deploy.options.build_dir, 'app_shell'),
Steve Funge984a532013-11-25 17:09:25 -0800303 makedirs=True)
304 self.deploy._CheckDeployType()
Daniel Erat1ae46382014-08-14 10:23:39 -0700305 self.assertTrue(self.getCopyPath('app_shell'))
306 self.assertFalse(self.getCopyPath('chrome'))
Steve Funge984a532013-11-25 17:09:25 -0800307
Daniel Erat1ae46382014-08-14 10:23:39 -0700308 def testChromeAndAppShellDetection(self):
Daniel Eratf53bd3a2016-12-02 11:28:36 -0700309 """Check for a chrome deployment when app_shell also exists."""
Steve Fung63d705d2014-03-16 03:14:03 -0700310 osutils.Touch(os.path.join(self.deploy.options.build_dir, 'chrome'),
311 makedirs=True)
Daniel Erat1ae46382014-08-14 10:23:39 -0700312 osutils.Touch(os.path.join(self.deploy.options.build_dir, 'app_shell'),
Steve Fung63d705d2014-03-16 03:14:03 -0700313 makedirs=True)
314 self.deploy._CheckDeployType()
Daniel Erat1ae46382014-08-14 10:23:39 -0700315 self.assertTrue(self.getCopyPath('chrome'))
Daniel Erat9813f0e2014-11-12 11:00:28 -0700316 self.assertFalse(self.getCopyPath('app_shell'))
Steve Fung63d705d2014-03-16 03:14:03 -0700317
Steve Funge984a532013-11-25 17:09:25 -0800318 def testChromeDetection(self):
319 """Check for a regular chrome deployment"""
320 osutils.Touch(os.path.join(self.deploy.options.build_dir, 'chrome'),
321 makedirs=True)
322 self.deploy._CheckDeployType()
Daniel Erat1ae46382014-08-14 10:23:39 -0700323 self.assertTrue(self.getCopyPath('chrome'))
Daniel Erat9813f0e2014-11-12 11:00:28 -0700324 self.assertFalse(self.getCopyPath('app_shell'))