Fix deploy_chrome with content_shell overlays
Fix content_shell detection and add copy paths conditionals for deploying
ECS with strict staging.
BUG=chromium:347780
TEST=`./scripts/deploy_chrome_unittest.py` test cases added and passes
Change-Id: I712260232febf5d707a7ca57b3cd69c9846b36cd
Reviewed-on: https://chromium-review.googlesource.com/190251
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Steve Fung <stevefung@chromium.org>
Commit-Queue: Steve Fung <stevefung@chromium.org>
Tested-by: Steve Fung <stevefung@chromium.org>
diff --git a/scripts/deploy_chrome_unittest.py b/scripts/deploy_chrome_unittest.py
index 5472b31..d519730 100755
--- a/scripts/deploy_chrome_unittest.py
+++ b/scripts/deploy_chrome_unittest.py
@@ -314,6 +314,22 @@
self.deploy._CheckDeployType()
self.assertTrue(self.deploy.content_shell)
+ def testContentShellOnlyDetection(self):
+ """Check for a content_shell deployment when no chrome exists."""
+ osutils.Touch(os.path.join(self.deploy.options.build_dir, 'content_shell'),
+ makedirs=True)
+ self.deploy._CheckDeployType()
+ self.assertTrue(self.deploy.content_shell)
+
+ def testChromeAndContentShellDetection(self):
+ """Check for a regular chrome deployment when content_shell also exists."""
+ osutils.Touch(os.path.join(self.deploy.options.build_dir, 'chrome'),
+ makedirs=True)
+ osutils.Touch(os.path.join(self.deploy.options.build_dir, 'content_shell'),
+ makedirs=True)
+ self.deploy._CheckDeployType()
+ self.assertFalse(self.deploy.content_shell)
+
def testChromeDetection(self):
"""Check for a regular chrome deployment"""
osutils.Touch(os.path.join(self.deploy.options.build_dir, 'chrome'),
@@ -321,6 +337,5 @@
self.deploy._CheckDeployType()
self.assertFalse(self.deploy.content_shell)
-
if __name__ == '__main__':
cros_test_lib.main()