@@ -157,20 +157,21 @@ def _dpkg_info(dpkg_package):
def list_all():
"""Returns a list with the names of all currently installed packages."""
- support_info = os_support()
- installed_packages = []
+ return []
+ #support_info = os_support()
+ #installed_packages = []
- if support_info['rpm']:
- installed_packages += utils.system_output('rpm -qa').splitlines()
+ #if support_info['rpm']:
+ # installed_packages += utils.system_output('rpm -qa').splitlines()
- if support_info['dpkg']:
- raw_list = utils.system_output('dpkg -l').splitlines()[5:]
- for line in raw_list:
- parts = line.split()
- if parts[0] == "ii": # only grab "installed" packages
- installed_packages.append("%s-%s" % (parts[1], parts[2]))
+ #if support_info['dpkg']:
+ # raw_list = utils.system_output('dpkg -l').splitlines()[5:]
+ # for line in raw_list:
+ # parts = line.split()
+ # if parts[0] == "ii": # only grab "installed" packages
+ # installed_packages.append("%s-%s" % (parts[1], parts[2]))
- return installed_packages
+ #return installed_packages
def info(package):
@@ -75,12 +75,12 @@ params = {
"name": "build",
"shortname": "build",
"type": "build",
- "mode": "release",
+ #"mode": "release",
#"mode": "snapshot",
#"mode": "localtar",
#"mode": "localsrc",
#"mode": "git",
- #"mode": "noinstall",
+ "mode": "noinstall",
#"mode": "koji",
## Are we going to load modules built by this test?
@@ -64,6 +64,7 @@ class kvm(test.test):
kvm_utils.dump_env(env, env_filename)
except Exception, e:
+ raise
logging.error("Test failed: %s", e)
logging.debug("Postprocessing on error...")
kvm_preprocessing.postprocess_on_error(self, params, env)
@@ -54,7 +54,7 @@ variants:
kill_vm_on_error = yes
force_create_image = yes
pre_command = scripts/unattended.py
- floppy = "floppy.img"
+ floppy = "images/floppy.img"
extra_params = "-boot d"
- setup: install
@@ -314,7 +314,8 @@ variants:
cdrom = linux/Fedora-11-x86_64-DVD.iso
md5sum = 9d419844adeb93120215fe7505c9bce8
install:
- steps =
+ type = stepmaker
+ steps = Fedora-11-64.steps
unattended_install:
tftp = "tftpboot"
extra_params = "-bootp /pxelinux.0 -boot n"
@@ -760,6 +761,14 @@ variants:
- @basic:
only Fedora Windows
- @full:
+ - @fc11_quick:
+ only qcow2
+ only ide
+ only default
+ only up
+ only Fedora.11.64
+ only install setup boot shutdown
+ only rtl8139
- @fc8_quick:
only qcow2
only ide
@@ -779,26 +788,26 @@ variants:
- @custom:
only qcow2.*ide.*default.*up.*Ubuntu-8.10-server.*(autotest.sleeptest)
only rtl8139
- - @winXP_32_unattended:
- only qcow2
- only ide
- only default
- only up
- only WinXP.32
- no install setup
- no kvm_hugepages
- only unattended_install
- only rtl8139
- - @fc11_kickstart:
- only qcow2
- only ide
- only default
- only up
- only Fedora.11.64
- no install setup
- no kvm_hugepages
- only unattended_install boot shutdown
- only rtl8139
+ #- @winXP_32_unattended:
+ # only qcow2
+ # only ide
+ # only default
+ # only up
+ # only WinXP.32
+ # no install setup
+ # no kvm_hugepages
+ # only unattended_install
+ # only rtl8139
+ #- @fc11_kickstart:
+ # only qcow2
+ # only ide
+ # only default
+ # only up
+ # only Fedora.11.64
+ # no install setup
+ # no kvm_hugepages
+ # only unattended_install boot shutdown
+ # only rtl8139
include kvm_cdkeys.cfg
@@ -810,4 +819,4 @@ steps ?<= steps/
# Choose your test list
-only fc8_quick
+only fc11_quick
@@ -6,6 +6,7 @@ KVM test utility functions.
import md5, thread, subprocess, time, string, random, socket, os, signal, pty
import select, re, logging, commands, cPickle
+import common
from autotest_lib.client.bin import utils
from autotest_lib.client.common_lib import error
import kvm_subprocess
@@ -268,12 +268,12 @@ class VM:
# {fat:floppy:}/path/. However vvfat is not usually recommended
floppy = params.get("floppy")
if floppy:
- floppy = os.path.join(image_dir, floppy)
+ floppy = os.path.join(root_dir, floppy)
qemu_cmd += " -fda %s" % floppy
tftp = params.get("tftp")
if tftp:
- tftp = os.path.join(image_dir, tftp)
+ tftp = os.path.join(root_dir, tftp)
qemu_cmd += " -tftp %s" % tftp
extra_params = params.get("extra_params")
@@ -1,10 +1,10 @@
#!/usr/bin/python
-# -*- coding: utf-8 -*-
-import os, sys, time
-
"""
Simple script to allocate enough hugepages for KVM testing purposes.
"""
+# -*- coding: utf-8 -*-
+import os, sys, time
+
class HugePageError(Exception):
"""
@@ -13,7 +13,7 @@ class HugePageError(Exception):
pass
-class HugePage:
+class HugePage(object):
def __init__(self, hugepage_path=None):
"""
Gets environment variable values and calculates the target number
@@ -1,11 +1,11 @@
#!/usr/bin/python
+"""
+Simple script to setup unattended installs on KVM guests.
+"""
# -*- coding: utf-8 -*-
import os, sys, shutil, tempfile, re
import common
-"""
-Simple script to setup unattended installs on KVM guests.
-"""
class SetupError(Exception):
"""
@@ -14,7 +14,7 @@ class SetupError(Exception):
pass
-class UnattendedInstall:
+class UnattendedInstall(object):
"""
Creates a floppy disk image that will contain a config file for unattended
OS install. Optionally, sets up a PXE install server using qemu built in
@@ -28,7 +28,6 @@ class UnattendedInstall:
script_dir = os.path.dirname(sys.modules[__name__].__file__)
kvm_test_dir = os.path.abspath(os.path.join(script_dir, ".."))
images_dir = os.path.join(kvm_test_dir, 'images')
- isos_dir = os.path.join(kvm_test_dir, 'isos')
self.deps_dir = os.path.join(kvm_test_dir, 'deps')
self.unattended_dir = os.path.join(kvm_test_dir, 'unattended')
@@ -55,7 +54,7 @@ class UnattendedInstall:
self.unattended_file = os.environ['KVM_TEST_unattended_file']
self.qemu_img_bin = os.path.join(kvm_test_dir, 'qemu-img')
- self.cdrom_iso = os.path.join(isos_dir, cdrom_iso)
+ self.cdrom_iso = os.path.join(kvm_test_dir, cdrom_iso)
self.floppy_mount = tempfile.mkdtemp(prefix='floppy_', dir='/tmp')
self.cdrom_mount = tempfile.mkdtemp(prefix='cdrom_', dir='/tmp')
self.floppy_img = os.path.join(images_dir, 'floppy.img')
@@ -69,9 +68,9 @@ class UnattendedInstall:
"""
print "Creating boot floppy"
- if self.floppy_img:
+ if os.path.exists(self.floppy_img):
os.remove(self.floppy_img)
- #c_cmd = 'bximage -q -fd -size=1.44 %s' % (self.floppy_img)
+
c_cmd = '%s create -f raw %s 1440k' % (self.qemu_img_bin, self.floppy_img)
if os.system(c_cmd):
raise SetupError('Could not create floppy image.')
new file mode 100644
@@ -0,0 +1,300 @@
+# Generated by Step Maker
+# Generated on Tue Oct 6 10:36:47 2009
+# uname -a: Linux freedom 2.6.30.8-64.fc11.x86_64 #1 SMP Fri Sep 25 04:43:32 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
+# --------------------------------
+step 6.25
+screendump 20091006_101057_5a9e4ddd1aa400022e7352cf316ce525.ppm
+# First boot selection
+barrier_2 455 240 92 15 4125ff600ed281ed9064f4f0e7174d79 31
+# Sending keys: ret
+key ret
+# --------------------------------
+step 18.60
+screendump 20091006_093142_b389f34c806212986da8b3d6e726df0b.ppm
+# Skip disk check
+barrier_2 329 98 189 98 c22e43f436ca151e0221e5794cca9de0 61
+# Sending keys: tab ret
+key tab
+key ret
+# --------------------------------
+step 35.04
+screendump 20091006_093224_b9879baaa82fbdfb43361cfe8d3c94eb.ppm
+# Anaconda
+barrier_2 354 243 336 277 130d9cbc7fa6691e2ec2d88080a53aef 80
+# Sending keys: ret
+key ret
+# --------------------------------
+step 38.52
+screendump 20091006_093251_e4804380593a28835f66021420d58c8a.ppm
+# Keyboard selection
+barrier_2 395 69 129 197 059a6c60cc6a75f26df4f10c84126b99 16
+# Sending keys: alt-n
+key alt-n
+# --------------------------------
+step 41.68
+screendump 20091006_093324_4c7bf859ec422cc4620f78b957259167.ppm
+# Keyboard selection
+barrier_2 324 61 125 195 30b31d0ec7ad3622ba9cb6d9a5f3c594 15
+# Sending keys: ret
+key ret
+# --------------------------------
+step 45.05
+screendump 20091006_093651_30a3b267354f40f908148e89aac32bae.ppm
+# Re-initialize drive warning
+barrier_2 277 89 371 324 a41a7b0a414c3a28dc060df76733884c 16
+# Sending keys: tab ret
+key tab
+key ret
+# --------------------------------
+step 48.67
+screendump 20091006_093717_ff2bbd32daf09472ca9d0500352bb94a.ppm
+# Hostname selection
+barrier_2 366 67 127 193 aec5091ede1f22134242dc6071181a28 16
+# Sending keys: ret
+key ret
+# --------------------------------
+step 52.69
+screendump 20091006_093740_b04f7f6c829aa7cccc98ab300deb154e.ppm
+# Timezone selection
+barrier_2 403 29 125 195 3535f82a2001fef00a1284f11d0473b0 19
+# Sending keys: ret
+key ret
+# --------------------------------
+step 56.10
+screendump 20091006_093759_db91bc8395c81b97679ea8e0166f7fff.ppm
+# Password selection
+barrier_2 338 68 137 191 3275de24f2b5558525f906b7e79c003b 16
+# Sending keys: 1 2 3 4 5 6 tab
+key 1
+key 2
+key 3
+key 4
+key 5
+key 6
+key tab
+# --------------------------------
+step 60.25
+screendump 20091006_093916_9e2ea1b1080110a97a89a9fdcb2da991.ppm
+# Password selection
+barrier_2 343 65 137 193 ba943f1b9fcb43f965beec6877ae7d2a 13
+# Sending keys: 1 2 3 4 5 6 tab
+key 1
+key 2
+key 3
+key 4
+key 5
+key 6
+key tab
+# --------------------------------
+step 65.19
+screendump 20091006_101742_40421c467a7b9cff7a634c3dd7d860fd.ppm
+# Next
+barrier_2 348 66 134 192 c38b11375333600c6defea099205d5e9 17
+# Sending keys: tab ret
+key tab
+key ret
+# --------------------------------
+step 67.90
+screendump 20091006_101756_c180a6bfb126aca6c67c5532a389a117.ppm
+# Warning about password
+barrier_2 423 73 302 332 ba138233c0505bdc1cbb323c95878ef9 11
+# Sending keys: tab ret
+key tab
+key ret
+# --------------------------------
+step 76.77
+screendump 20091006_101825_9fcb98aa91907ed368a72bb219ddeb83.ppm
+# Partitioning screen
+barrier_2 743 67 126 193 e3b6ce97edf0e53443677f64eb399582 42
+# Sending keys: ret
+key ret
+# --------------------------------
+step 79.86
+screendump 20091006_101847_4a977ba29bd000181aeb7d1bcd2ae8ec.ppm
+# Dialog about disk options
+barrier_2 362 68 333 334 9f9ad582e0d6a6ee1c0e7d7806935e8c 14
+# Sending keys: tab ret
+key tab
+key ret
+# --------------------------------
+step 129.23
+screendump 20091006_101934_4c43f3f583d1d10ffd45b07acecfc894.ppm
+# Package selection
+barrier_2 678 49 131 204 18f767f89dd263171198c034e5b69b65 245
+# Sending keys: tab
+key tab
+# --------------------------------
+step 132.07
+screendump 20091006_104352_75857f9e155507789f7917e94bab1cba.ppm
+# Disable office, enable software development
+barrier_2 640 58 128 198 91fb98366cacf968b1e9ab872349189e 13
+# Sending keys: spc down spc
+key spc
+key down
+key spc
+# --------------------------------
+step 135.83
+screendump 20091006_104432_4e2e2cb831e5ace9a61a5e0085f3b496.ppm
+# Proceed
+barrier_2 622 57 129 197 3e6932dddde155c9b5998092e7ddb8f3 15
+# Sending keys: alt-n
+key alt-n
+# --------------------------------
+step 1202.16
+screendump 20091006_110235_8bfc7c8eb54958d0c9a941d8374bf965.ppm
+# Reboot
+barrier_2 506 116 395 342 6c4cf0e47d4aba9d85365ffaa6907384 5331
+# Sending keys: alt-t
+key alt-t
+# --------------------------------
+step 1275.40
+screendump 20091006_110407_9329c76ac85b3d3ed67e4fdd84c7df83.ppm
+# First boot
+barrier_2 350 254 484 286 9d72bb3984c90e365f79bae16d8c7c38 365
+# Sending keys: alt-f
+key alt-f
+# --------------------------------
+step 1306.15
+screendump 20091006_110504_53c65a8c7147f2f56817f25d7c60ca98.ppm
+# License
+barrier_2 236 69 277 428 9ac059229f81f3bdbca5e3ce302262cb 153
+# Sending keys: alt-f
+key alt-f
+# --------------------------------
+step 1321.63
+screendump 20091006_110533_effc23742f795ed6248a5eee20373edb.ppm
+# Create user
+barrier_2 525 105 270 8 51254ae6ed9cba5fd774ddec58e6416f 76
+# Sending keys: tab
+key tab
+# --------------------------------
+step 1364.82
+screendump 20091006_110635_537f533d2e36d5846abb98b304132f03.ppm
+barrier_2 526 110 278 7 15e7915d62c5511f53b4748220fe5f04 215
+# Sending keys: u s e r tab
+key u
+key s
+key e
+key r
+key tab
+# --------------------------------
+step 1367.81
+screendump 20091006_110653_71f19347eade20cf1c4eec83994a44ae.ppm
+barrier_2 523 108 280 8 246b76cdc48bbe200b4d77a225857de7 9
+# Sending keys: 1 2 3 4 5 6 tab 1 2 3 4 5 6
+key 1
+key 2
+key 3
+key 4
+key 5
+key 6
+key tab
+key 1
+key 2
+key 3
+key 4
+key 5
+key 6
+# --------------------------------
+step 1393.22
+screendump 20091006_110816_10bae809cb9101043873a79e4962dc16.ppm
+barrier_2 527 103 277 12 bbefc6b19bd8f25b2801e59f40a0c9a5 112
+# Sending keys: tab tab tab tab
+key tab
+key tab
+key tab
+key tab
+# --------------------------------
+step 1396.15
+screendump 20091006_110833_8a366d29c48140d07765693047333592.ppm
+barrier_2 527 105 273 6 d07d1ddace6a0a746b3f218a0fbf6b2f 10
+# Sending keys: u s e r tab tab tab tab tab tab ret
+key u
+key s
+key e
+key r
+key tab
+key tab
+key tab
+key tab
+key tab
+key tab
+key ret
+# --------------------------------
+step 1401.44
+screendump 20091006_110903_8a17e74066a8d1c1d2e4e7970b520cba.ppm
+# Warning
+barrier_2 566 107 266 9 d877a8e5818bc0e24a28da8ecda02b90 14
+# Sending keys: tab ret
+key tab
+key ret
+# --------------------------------
+step 1486.96
+screendump 20091006_111045_e42563635a5ea916c0114ed18a8775df.ppm
+# Date and time
+barrier_2 335 100 281 8 7e6fce0ad350cc520b2d5de143155f65 426
+# Sending keys: alt-f
+key alt-f
+# --------------------------------
+step 1512.78
+screendump 20091006_111128_da235fc79b2cc280b947e12bdd05cc3e.ppm
+# Profile
+barrier_2 534 148 274 5 c0545699bd654177b55627de7f2841da 128
+# Sending keys: alt-f
+key alt-f
+# --------------------------------
+step 1515.20
+screendump 20091006_111152_fabcce3f0a32bb3d8976db1e07df4090.ppm
+# Do not send!
+barrier_2 568 146 285 6 2ab34dcb11170a74dc5407a08edd7e40 11
+# Sending keys: tab ret
+key tab
+key ret
+# --------------------------------
+step 1543.84
+screendump 20091006_111235_9191358b97c0b89c213dce06f6ab58bc.ppm
+# Login
+barrier_2 208 86 408 254 caf95d94a614ca983ec1539189bad39e 141
+# Sending keys: ret
+key ret
+# --------------------------------
+step 1547.35
+screendump 20091006_111254_11a45bc04148970ea552e40a298118e1.ppm
+# Password
+barrier_2 153 90 438 220 05a1d279d31c062c954fbf31411a0428 16
+# Sending keys: 1 2 3 4 5 6 ret
+key 1
+key 2
+key 3
+key 4
+key 5
+key 6
+key ret
+# --------------------------------
+step 1582.99
+screendump 20091006_111343_6ce2e23219f84766a8bf3c1a294b0a81.ppm
+# Desktop reached, shut down
+barrier_2 156 385 26 36 b2ba693157d7f91a3cbdbeb87d84aa56 170
+# Sending keys: alt-f1
+key alt-f1
+# --------------------------------
+step 1586.70
+screendump 20091006_111541_63c24ada19a3fef5b0e220f343b91cb5.ppm
+barrier_2 134 129 41 297 82df7cce3e0e3c025b09c2f47b96c1a1 17
+# Sending keys: right right
+key right
+key right
+# --------------------------------
+step 1591.05
+screendump 20091006_111601_e0eba274ed71a5bc482efb84d74bf864.ppm
+barrier_2 115 105 31 294 30aaa764a2eff759272bca1452c478c0 20
+# Sending keys: up ret
+key up
+key ret
+# --------------------------------
+step 1594.11
+screendump 20091006_111627_572ddbe03385bed9a3902cc068fb6471.ppm
+# Bye!
+barrier_2 134 107 24 293 5e4f2da864c54e381ee092b7a6f611f6 13
+# Sending keys: ret
+key ret
@@ -13,11 +13,7 @@ def run_unattended_install(test, params, env):
@param params: Dictionary with the test parameters.
@param env: Dictionary with test environment.
"""
- vm = kvm_utils.env_get_vm(env, params.get("main_vm"))
- if not vm:
- raise error.TestError("VM object not found in environment")
- if not vm.is_alive():
- raise error.TestError("VM seems to be dead; Test requires a living VM")
+ vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
logging.info("Starting unattended install watch process")
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -28,7 +28,7 @@ os.system('iptables -F')
os.system('echo 0 > /selinux/enforce')
port = 12323
buf = 1024
-addr = ('10.0.0.2', port)
+addr = ('10.0.2.2', port)
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(addr)
client.sendto('done', addr)
@@ -64,7 +64,7 @@
BrandIEUsingUnattended=Yes
[GuiRunOnce]
- Command0="cmd /c A:\finish.exe 10.0.0.2"
+ Command0="cmd /c A:\finish.exe 10.0.2.2"
[Display]
Xresolution=1024