mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virt-install: add tests for OVMF
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
24
tests/xmlparse-xml/change-boot-uefi-in.xml
Normal file
24
tests/xmlparse-xml/change-boot-uefi-in.xml
Normal 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>
|
||||
26
tests/xmlparse-xml/change-boot-uefi-out.xml
Normal file
26
tests/xmlparse-xml/change-boot-uefi-out.xml
Normal 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>
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user