Skip to content

Commit

Permalink
Merge pull request autotest#6081 from meinaLi/sriov_pxe
Browse files Browse the repository at this point in the history
sriov: fix ipxe rom file issue
  • Loading branch information
Yingshun authored Dec 25, 2024
2 parents 05c945d + c1b4841 commit 6f63029
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions provider/sriov/sriov_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,11 @@ def get_rom_file(self):
rom_vendor_device = lspci_stdout[1:-1].replace(':', '') + '.rom'
rom_file = os.path.join('/usr/share/ipxe', rom_vendor_device)
if not os.path.exists(rom_file):
build_cmd = "git clone https://github.com/ipxe/ipxe.git;\
pushd ipxe/src; make bin/{0}; cp bin/{0} {1}; popd; \
rm -rf ipxe".format(rom_vendor_device, rom_file)
process.run(build_cmd, shell=True, verbose=True)
if not os.path.exists(rom_file):
self.test.error("This test needs rom file: %s." % rom_file)
virtio_rom_file = "/usr/share/ipxe/1af41000.rom"
if not os.path.exists(virtio_rom_file):
self.test.error(f"This test needs a rom file, but neither {rom_file}"
"nor {virtio_rom_file} exist!")
return virtio_rom_file
return rom_file

def create_iface_dev(self, dev_type, iface_dict):
Expand Down

0 comments on commit 6f63029

Please sign in to comment.