mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
tests: More bhyve UEFI testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
1bcd442bfd
commit
d304a9b205
59
tests/data/cli/compare/virt-install-bhyve-uefi.xml
Normal file
59
tests/data/cli/compare/virt-install-bhyve-uefi.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<domain type="bhyve">
|
||||
<name>foobhyve</name>
|
||||
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||
<memory>262144</memory>
|
||||
<currentMemory>262144</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch="x86_64">hvm</type>
|
||||
<loader readonly="yes" type="pflash">/usr/local/share/uefi-firmware/BHYVE_UEFI.fd</loader>
|
||||
<boot dev="network"/>
|
||||
</os>
|
||||
<clock offset="utc"/>
|
||||
<on_reboot>destroy</on_reboot>
|
||||
<devices>
|
||||
<emulator>bhyve</emulator>
|
||||
<interface type="bridge">
|
||||
<source bridge="testsuitebr0"/>
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
<model type="e1000"/>
|
||||
</interface>
|
||||
<console type="nmdm">
|
||||
<source master="/dev/nmdm00000000-1111-2222-3333-444444444444A" slave="/dev/nmdm00000000-1111-2222-3333-444444444444B"/>
|
||||
</console>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<graphics type="vnc" port="-1"/>
|
||||
<video>
|
||||
<model type="vga"/>
|
||||
</video>
|
||||
</devices>
|
||||
</domain>
|
||||
<domain type="bhyve">
|
||||
<name>foobhyve</name>
|
||||
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||
<memory>262144</memory>
|
||||
<currentMemory>262144</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch="x86_64">hvm</type>
|
||||
<loader readonly="yes" type="pflash">/usr/local/share/uefi-firmware/BHYVE_UEFI.fd</loader>
|
||||
<boot dev="network"/>
|
||||
</os>
|
||||
<clock offset="utc"/>
|
||||
<devices>
|
||||
<emulator>bhyve</emulator>
|
||||
<interface type="bridge">
|
||||
<source bridge="testsuitebr0"/>
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
<model type="e1000"/>
|
||||
</interface>
|
||||
<console type="nmdm">
|
||||
<source master="/dev/nmdm00000000-1111-2222-3333-444444444444A" slave="/dev/nmdm00000000-1111-2222-3333-444444444444B"/>
|
||||
</console>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<graphics type="vnc" port="-1"/>
|
||||
<video>
|
||||
<model type="vga"/>
|
||||
</video>
|
||||
</devices>
|
||||
</domain>
|
@ -1120,7 +1120,8 @@ c.add_compare("""
|
||||
########################
|
||||
|
||||
c = vinst.add_category("bhyve", "--name foobhyve --noautoconsole --connect " + utils.URIs.bhyve)
|
||||
c.add_compare("--os-variant fedora27 --boot uefi", "bhyve-default-f27")
|
||||
c.add_compare("--boot uefi --disk none --ram 256 --pxe", "bhyve-uefi")
|
||||
c.add_compare("--os-variant fedora27", "bhyve-default-f27")
|
||||
|
||||
|
||||
|
||||
|
@ -211,20 +211,17 @@ class DomainCapabilities(XMLBuilder):
|
||||
if not self.arch_can_uefi():
|
||||
return # pragma: no cover
|
||||
|
||||
firmware_files = [f.value for f in self.os.loader.values]
|
||||
if self.conn.is_bhyve():
|
||||
firmware_files = [f.value for f in self.os.loader.values]
|
||||
if not firmware_files:
|
||||
return
|
||||
|
||||
for firmware_file in firmware_files:
|
||||
if 'BHYVE_UEFI.fd' in firmware_file:
|
||||
return firmware_file
|
||||
|
||||
return firmware_files[0]
|
||||
return (firmware_files and
|
||||
firmware_files[0] or None) # pragma: no cover
|
||||
|
||||
patterns = self._uefi_arch_patterns.get(self.arch)
|
||||
for pattern in patterns:
|
||||
for path in [v.value for v in self.os.loader.values]:
|
||||
for path in firmware_files:
|
||||
if re.match(pattern, path):
|
||||
return path
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user