new file mode 100644
@@ -0,0 +1,24 @@
+import logging, pexpect
+from autotest_lib.client.common_lib import error
+import kvm_test_utils, kvm_subprocess
+
+def run_vnc(test, params, env):
+ """
+ Test whether guest could be interacted with vnc.
+
+ @param test: kvm test object
+ @param params: Dictionary with the test parameters
+ @param env: Dictionary with test environment.
+ """
+ vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
+ session = kvm_test_utils.wait_for_login(vm)
+
+ # Start vnc connection test
+ vnc_port = str(vm.vnc_port - 5900)
+ vnc_cmd = "vncviewer" + " localhost:" + vnc_port
+ logging.debug("Using command to vnc connect: %s" % vnc_cmd)
+
+ p = kvm_subprocess.run_bg(vnc_cmd, None, logging.debug, "(vnc) ")
+ if not p.is_alive():
+ raise error.TestFail("Vnc connect to guest failed")
+ p.close()
@@ -270,6 +270,9 @@ variants:
type = physical_resources_check
catch_uuid_cmd = dmidecode | awk -F: '/UUID/ {print $2}'
+ - vnc: install setup unattended_install
+ type = vnc
+
# NICs
variants:
- @rtl8139: