[PATCH 2/6] KVM test: Make unattended _install use the new pre script

Lucas Meneghel Rodrigues
2011-01-22T01:30:46Z

Also, get rid of references to the old unattended install
script.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/kvm_preprocessing.py | 6 +++++-
client/tests/kvm/tests_base.cfg.sample | 2 --
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
index 41455cf..12adb6a 100644
--- a/client/tests/kvm/kvm_preprocessing.py
+++ b/client/tests/kvm/kvm_preprocessing.py
@@ -1,7 +1,7 @@
import sys, os, time, commands, re, logging, signal, glob, threading, shutil
from autotest_lib.client.bin import test, utils
from autotest_lib.client.common_lib import error
-import kvm_vm, kvm_utils, kvm_subprocess, kvm_monitor, ppm_utils
+import kvm_vm, kvm_utils, kvm_subprocess, kvm_monitor, ppm_utils, test_setup
try:
import PIL.Image
except ImportError:
@@ -258,6 +258,10 @@ def preprocess(test, params, env):
h = kvm_utils.HugePageConfig(params)
h.setup()

+ if params.get("type") == "unattended_install":
+ u = test_setup.UnattendedInstallConfig(test, params)
+ u.setup()
+
# Execute any pre_commands
if params.get("pre_command"):
process_command(test, params, env, params.get("pre_command"),
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index 184a582..c727c32 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -97,7 +97,6 @@ variants:
kill_vm_gracefully = yes
kill_vm_on_error = yes
force_create_image = yes
- pre_command += " scripts/unattended.py;"
extra_params += " -boot d"
guest_port_unattended_install = 12323
kernel = vmlinuz
@@ -381,7 +380,6 @@ variants:
# The support VM is identical to the tested VM in every way
# except for the image name which ends with '-supportvm'.
type = unattended_install
- pre_command += " scripts/unattended.py;"
extra_params += " -boot d"
force_create_image = yes
kill_vm = yes
--
1.7.3.4