Skip to content

Commit

Permalink
Merge pull request avocado-framework#3786 from MiriamDeng/add_slof_info
Browse files Browse the repository at this point in the history
VM_bootloader:provide bootloader's version for each arch
  • Loading branch information
YongxueHong authored Dec 19, 2023
2 parents 24b13b1 + 936fb66 commit fca87a6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions virttest/env_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,17 @@ def preprocess(test, params, env):
test.cancel("Got host qemu version:%s, which is not in %s" %
(host_qemu, required_qemu))

# Get the version of bootloader
vm_bootloader_ver_cmd = params.get("vm_bootloader_ver_cmd", "")
if vm_bootloader_ver_cmd:
try:
vm_bootloader_ver = a_process.run(
vm_bootloader_ver_cmd, shell=True).stdout_text.strip()
except a_process.CmdError:
vm_bootloader_ver = "Unkown"
version_info["vm_bootloader_version"] = str(vm_bootloader_ver)
LOG.debug("vm bootloader version: %s", vm_bootloader_ver)

# Get the Libvirt version
if vm_type == "libvirt":
libvirt_ver_cmd = params.get("libvirt_ver_cmd", "libvirtd -V|awk -F' ' '{print $3}'")
Expand Down
7 changes: 7 additions & 0 deletions virttest/shared/cfg/base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1087,3 +1087,10 @@ uuid_dimm = ""

# Set image_extent_size_hint, displayed in qemu-img info extend_size_hint field.
#image_extent_size_hint = 1G #To set extent_size_hint to 1G

#
#VM bootloader params
#
#Notes: please make sure the corresponding firmware before you set this value!
#eg. for x86_64
#vm_bootloader_ver_cmd = "rpm -qa|grep ^sea"

0 comments on commit fca87a6

Please sign in to comment.