KVM test: Unattended install - make sure to check if vm.is_alive()
Sometimes, the VM might segfault in the middle of the unattended
install test. If that happens today, the unattended install will
keep waiting until the timeout is reached. So check if the VM
is alive during the main unattended install loop.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4649 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/kvm/scripts/unattended.py b/client/tests/kvm/scripts/unattended.py
index 0377d83..d9b8912 100755
--- a/client/tests/kvm/scripts/unattended.py
+++ b/client/tests/kvm/scripts/unattended.py
@@ -129,7 +129,7 @@
else:
print ("WARNING: 'cdkey' required but not specified for "
"this unattended installation")
-
+
dummy_re = r'\bKVM_TEST_MEDIUM\b'
if self.medium == "cdrom":
content = "cdrom"
@@ -139,9 +139,11 @@
content = "nfs --server=%s --dir=%s" % (self.nfs_server, self.nfs_dir)
else:
raise SetupError("Unexpected installation medium %s" % self.url)
-
+
unattended_contents = re.sub(dummy_re, content, unattended_contents)
+ print
+ print "Unattended install %s contents:" % dest_fname
print unattended_contents
# Write the unattended file contents to 'dest'
open(dest, 'w').write(unattended_contents)