virt-install: add tests for OVMF

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2014-09-11 18:39:24 +02:00
parent d2fffa509e
commit 17a37ea39b
3 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<domain type="xen">
<name>TestGuest</name>
<currentMemory>204800</currentMemory>
<memory>409600</memory>
<uuid>12345678-1234-1234-1234-123456789012</uuid>
<os>
<type arch="i686">linux</type>
<kernel>/boot/vmlinuz</kernel>
<initrd>/boot/initrd</initrd>
<cmdline>location</cmdline>
</os>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<vcpu>5</vcpu>
<devices>
<disk type="block" device="disk">
<source dev="/dev/null"/>
<target dev="xvda" bus="xen"/>
</disk>
<input type="mouse" bus="xen"/>
<graphics type="vnc" port="-1" keymap="ja"/>
</devices>
</domain>

View File

@@ -0,0 +1,26 @@
<domain type="xen">
<name>TestGuest</name>
<currentMemory>204800</currentMemory>
<memory>409600</memory>
<uuid>12345678-1234-1234-1234-123456789012</uuid>
<os>
<type arch="i686">linux</type>
<loader readonly="yes" type="pflash">OVMF_CODE.fd</loader>
<nvram template="/tmp/template">/tmp/nvram_store</nvram>
<boot dev="network"/>
<boot dev="hd"/>
<boot dev="fd"/>
</os>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<vcpu>5</vcpu>
<devices>
<disk type="block" device="disk">
<source dev="/dev/null"/>
<target dev="xvda" bus="xen"/>
</disk>
<input type="mouse" bus="xen"/>
<graphics type="vnc" port="-1" keymap="ja"/>
</devices>
</domain>

View File

@@ -286,6 +286,24 @@ class XMLParseTest(unittest.TestCase):
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterBootUEFI(self):
guest, outfile = self._get_test_content("change-boot-uefi")
check = self._make_checker(guest.os)
check("bootorder", [], ["network", "hd", "fd"])
check("loader_ro", None, True)
check("loader_type", None, "pflash")
check("nvram", None, "/tmp/nvram_store")
check("nvram_template", None, "/tmp/template")
check("loader", None, "OVMF_CODE.fd")
check("kernel", "/boot/vmlinuz", None)
check("initrd", "/boot/initrd", None)
check("kernel_args", "location", None)
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterCpuMode(self):
guest, outfile = self._get_test_content("change-cpumode")