deploy_chrome fixes/enhancements.
1) No longer requires sudo access. We rely on the fact that the
receiving rsync process on the device is running as root.
2) Permissions are set properly when deploying from a build directory.
3) Localizes binary stripping and binary permission setting in a Copier
class.
4) Adds content_shell and widevine libraries to list of artifacts to
deploy.
BUG=None
TEST=Deploying to daisy.
Change-Id: I35be3fe15cb25ded0f80667e43277cc6b27867e5
Reviewed-on: https://gerrit.chromium.org/gerrit/44003
Commit-Queue: Ryan Cui <rcui@chromium.org>
Reviewed-by: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
diff --git a/scripts/deploy_chrome_unittest.py b/scripts/deploy_chrome_unittest.py
index eb63dc2..01b9469 100755
--- a/scripts/deploy_chrome_unittest.py
+++ b/scripts/deploy_chrome_unittest.py
@@ -190,17 +190,22 @@
class TestUiJobStarted(DeployTest):
"""Test detection of a running 'ui' job."""
- def MockStatusUiCmd(self, output):
- self.deploy_mock.rsh_mock.AddCmdResult('status ui', output=output)
+ def MockStatusUiCmd(self, **kwargs):
+ self.deploy_mock.rsh_mock.AddCmdResult('status ui', **kwargs)
def testUiJobStartedFalse(self):
"""Correct results with a stopped job."""
- self.MockStatusUiCmd('ui stop/waiting')
+ self.MockStatusUiCmd(output='ui stop/waiting')
+ self.assertFalse(self.deploy._CheckUiJobStarted())
+
+ def testNoUiJob(self):
+ """Correct results when the job doesn't exist."""
+ self.MockStatusUiCmd(error='start: Unknown job: ui', returncode=1)
self.assertFalse(self.deploy._CheckUiJobStarted())
def testCheckRootfsWriteableTrue(self):
"""Correct results with a running job."""
- self.MockStatusUiCmd('ui start/running, process 297')
+ self.MockStatusUiCmd(output='ui start/running, process 297')
self.assertTrue(self.deploy._CheckUiJobStarted())
@@ -208,7 +213,6 @@
"""Test user-mode and ebuild-mode staging functionality."""
def setUp(self):
- self.sudo_cleanup = True
self.staging_dir = os.path.join(self.tempdir, 'staging')
self.build_dir = os.path.join(self.tempdir, 'build_dir')
self.common_flags = ['--build-dir', self.build_dir,