deploy_chrome: Add envoy support.
BUG=chromium:426914
TEST=built chromeos-chrome with the envoy USE flag and
checked that envoy_shell was installed; also updated
deploy_chrome_unittest.py and verified that it still
passes
Change-Id: Id8c2f857b19cfbf14effea8ca11db78fa2a0f225
Reviewed-on: https://chromium-review.googlesource.com/229431
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
diff --git a/scripts/deploy_chrome_unittest.py b/scripts/deploy_chrome_unittest.py
index 87898a9..3da0648 100755
--- a/scripts/deploy_chrome_unittest.py
+++ b/scripts/deploy_chrome_unittest.py
@@ -312,6 +312,15 @@
class TestDeploymentType(DeployTestBuildDir):
"""Test detection of deployment type using build dir."""
+ def testEnvoyDetection(self):
+ """Check for an envoy deployment"""
+ osutils.Touch(os.path.join(self.deploy.options.build_dir, 'envoy_shell'),
+ makedirs=True)
+ self.deploy._CheckDeployType()
+ self.assertTrue(self.getCopyPath('envoy_shell'))
+ self.assertFalse(self.getCopyPath('app_shell'))
+ self.assertFalse(self.getCopyPath('chrome'))
+
def testAppShellDetection(self):
"""Check for an app_shell deployment"""
osutils.Touch(os.path.join(self.deploy.options.build_dir, 'app_shell'),
@@ -319,24 +328,29 @@
self.deploy._CheckDeployType()
self.assertTrue(self.getCopyPath('app_shell'))
self.assertFalse(self.getCopyPath('chrome'))
+ self.assertFalse(self.getCopyPath('envoy_shell'))
def testChromeAndAppShellDetection(self):
- """Check for a regular chrome deployment when app_shell also exists."""
+ """Check for a chrome deployment when app_shell/envoy_shell also exist."""
osutils.Touch(os.path.join(self.deploy.options.build_dir, 'chrome'),
makedirs=True)
osutils.Touch(os.path.join(self.deploy.options.build_dir, 'app_shell'),
makedirs=True)
+ osutils.Touch(os.path.join(self.deploy.options.build_dir, 'envoy_shell'),
+ makedirs=True)
self.deploy._CheckDeployType()
- self.assertFalse(self.getCopyPath('app_shell'))
self.assertTrue(self.getCopyPath('chrome'))
+ self.assertFalse(self.getCopyPath('app_shell'))
+ self.assertFalse(self.getCopyPath('envoy_shell'))
def testChromeDetection(self):
"""Check for a regular chrome deployment"""
osutils.Touch(os.path.join(self.deploy.options.build_dir, 'chrome'),
makedirs=True)
self.deploy._CheckDeployType()
- self.assertFalse(self.getCopyPath('app_shell'))
self.assertTrue(self.getCopyPath('chrome'))
+ self.assertFalse(self.getCopyPath('app_shell'))
+ self.assertFalse(self.getCopyPath('envoy_shell'))
if __name__ == '__main__':
cros_test_lib.main()