Add 'ssvnc' to setup installing required packages.
Bug: 116683167
Test: ./run_tests.sh, m acloud && acloud setup --host.
Change-Id: I133ec7b8c5eb46939d146cd4baf25214d0cd19b0
diff --git a/setup/host_setup_runner.py b/setup/host_setup_runner.py
index 569a16d..7869cae 100644
--- a/setup/host_setup_runner.py
+++ b/setup/host_setup_runner.py
@@ -36,7 +36,7 @@
# Install cuttlefish-common will probably not work now.
# TODO: update this to pull from the proper repo.
-_CUTTLEFISH_REQUIRED_PKGS = ["cuttlefish-common"]
+_AVD_REQUIRED_PKGS = ["cuttlefish-common", "ssvnc"]
# dict of supported system and their distributions.
_SUPPORTED_SYSTEMS_AND_DISTS = {"Linux": ["Ubuntu", "Debian"]}
_LIST_OF_GROUPS = ["kvm", "libvirt", "cvdnetwork"]
@@ -64,13 +64,13 @@
return platform_supported
-class CuttlefishPkgInstaller(base_task_runner.BaseTaskRunner):
+class AvdPkgInstaller(base_task_runner.BaseTaskRunner):
"""Subtask runner class for installing required packages."""
WELCOME_MESSAGE_TITLE = "Install required package for host setup"
WELCOME_MESSAGE = (
"This step will walk you through the required packages installation for "
- "running Android cuttlefish devices on your host.")
+ "running Android cuttlefish devices and vnc on your host.")
def ShouldRun(self):
"""Check if required packages are all installed.
@@ -83,7 +83,7 @@
# Any required package is not installed or not up-to-date will need to
# run installation task.
- for pkg_name in _CUTTLEFISH_REQUIRED_PKGS:
+ for pkg_name in _AVD_REQUIRED_PKGS:
if not setup_common.PackageInstalled(pkg_name):
return True
@@ -93,9 +93,9 @@
"""Install Cuttlefish-common package."""
logger.info("Start to install required package: %s ",
- _CUTTLEFISH_REQUIRED_PKGS)
+ _AVD_REQUIRED_PKGS)
- for pkg in _CUTTLEFISH_REQUIRED_PKGS:
+ for pkg in _AVD_REQUIRED_PKGS:
setup_common.InstallPackage(pkg)
logger.info("All required package are installed now.")
diff --git a/setup/host_setup_runner_test.py b/setup/host_setup_runner_test.py
index 072998e..fcb843a 100644
--- a/setup/host_setup_runner_test.py
+++ b/setup/host_setup_runner_test.py
@@ -21,7 +21,7 @@
from acloud.internal.lib import driver_test_lib
from acloud.setup import setup_common
from acloud.setup.host_setup_runner import CuttlefishHostSetup
-from acloud.setup.host_setup_runner import CuttlefishPkgInstaller
+from acloud.setup.host_setup_runner import AvdPkgInstaller
class CuttlefishHostSetupTest(driver_test_lib.BaseDriverTest):
@@ -97,20 +97,20 @@
self.CuttlefishHostSetup._CheckLoadedModules(["module1", "module3"]))
-class CuttlefishPkgInstallerTest(driver_test_lib.BaseDriverTest):
- """Test CuttlefishPkgInstaller."""
+class AvdPkgInstallerTest(driver_test_lib.BaseDriverTest):
+ """Test AvdPkgInstallerTest."""
# pylint: disable=invalid-name
def setUp(self):
"""Set up the test."""
- super(CuttlefishPkgInstallerTest, self).setUp()
- self.CuttlefishPkgInstaller = CuttlefishPkgInstaller()
+ super(AvdPkgInstallerTest, self).setUp()
+ self.AvdPkgInstaller = AvdPkgInstaller()
def testShouldNotRun(self):
"""Test ShoudRun should raise error in non-linux os."""
self.Patch(platform, "system", return_value="Mac")
- self.assertFalse(self.CuttlefishPkgInstaller.ShouldRun())
+ self.assertFalse(self.AvdPkgInstaller.ShouldRun())
if __name__ == "__main__":
diff --git a/setup/setup.py b/setup/setup.py
index aaa272c..ca34487 100644
--- a/setup/setup.py
+++ b/setup/setup.py
@@ -42,7 +42,7 @@
_PrintWelcomeMessage()
# 2.Init all subtasks in queue and traverse them.
- host_runner = host_setup_runner.CuttlefishPkgInstaller()
+ host_runner = host_setup_runner.AvdPkgInstaller()
host_env_runner = host_setup_runner.CuttlefishHostSetup()
gcp_runner = gcp_setup_runner.GcpTaskRunner(args.config_file)
task_queue = []