mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-08-14 07:12:08 +00:00
Port to debian
This commit is contained in:
parent
79b95f1092
commit
586dedee72
2
debian/tests/10_uefi_boot_tests.py
vendored
2
debian/tests/10_uefi_boot_tests.py
vendored
@ -42,7 +42,7 @@ class UEFIBootTests(UEFITestsBase):
|
|||||||
def testNewShim(self):
|
def testNewShim(self):
|
||||||
"""Validate that a new SHIM binary on the image will boot"""
|
"""Validate that a new SHIM binary on the image will boot"""
|
||||||
new_shim = UEFIVirtualMachine(self.base_image)
|
new_shim = UEFIVirtualMachine(self.base_image)
|
||||||
new_shim.update(src='/usr/lib/shim/shimx64.efi.signed', dst='/boot/efi/EFI/ubuntu/shimx64.efi')
|
new_shim.update(src='/usr/lib/shim/shimx64.efi.signed', dst='/boot/efi/EFI/debian/shimx64.efi')
|
||||||
new_shim.update(src='/usr/lib/shim/shimx64.efi.signed', dst='/boot/efi/EFI/BOOT/BOOTX64.efi')
|
new_shim.update(src='/usr/lib/shim/shimx64.efi.signed', dst='/boot/efi/EFI/BOOT/BOOTX64.efi')
|
||||||
new_shim.run()
|
new_shim.run()
|
||||||
self.assertBoots(new_shim)
|
self.assertBoots(new_shim)
|
||||||
|
6
debian/tests/uefi_tests_base.py
vendored
6
debian/tests/uefi_tests_base.py
vendored
@ -67,7 +67,7 @@ class UEFITestsBase(unittest.TestCase):
|
|||||||
# Base paths for the ESP.
|
# Base paths for the ESP.
|
||||||
klass.uefi_base_dir = os.path.join('/', 'boot', 'efi', 'EFI')
|
klass.uefi_base_dir = os.path.join('/', 'boot', 'efi', 'EFI')
|
||||||
klass.uefi_boot_dir = os.path.join(klass.uefi_base_dir, 'BOOT')
|
klass.uefi_boot_dir = os.path.join(klass.uefi_base_dir, 'BOOT')
|
||||||
klass.uefi_install_dir = os.path.join(klass.uefi_base_dir, 'ubuntu')
|
klass.uefi_install_dir = os.path.join(klass.uefi_base_dir, 'debian')
|
||||||
|
|
||||||
# CAs for signature validation
|
# CAs for signature validation
|
||||||
klass.canonical_ca = os.path.join('/usr/share/grub', 'canonical-uefi-ca.crt')
|
klass.canonical_ca = os.path.join('/usr/share/grub', 'canonical-uefi-ca.crt')
|
||||||
@ -151,7 +151,7 @@ DEFAULT_METADATA = 'instance-id: nocloud\nlocal-hostname: autopkgtest\n'
|
|||||||
|
|
||||||
DEFAULT_USERDATA = """#cloud-config
|
DEFAULT_USERDATA = """#cloud-config
|
||||||
locale: en_US.UTF-8
|
locale: en_US.UTF-8
|
||||||
password: ubuntu
|
password: debian
|
||||||
chpasswd: { expire: False }
|
chpasswd: { expire: False }
|
||||||
ssh_pwauth: True
|
ssh_pwauth: True
|
||||||
manage_etc_hosts: True
|
manage_etc_hosts: True
|
||||||
@ -173,7 +173,7 @@ class UEFIVirtualMachine(UEFITestsBase):
|
|||||||
self.path = tempfile.mkstemp(dir=self.autopkgtest_dir.name)[1]
|
self.path = tempfile.mkstemp(dir=self.autopkgtest_dir.name)[1]
|
||||||
if not base:
|
if not base:
|
||||||
subprocess.run(['wget',
|
subprocess.run(['wget',
|
||||||
'http://cloud-images.ubuntu.com/%s/current/%s-server-cloudimg-%s.img'
|
'http://cloud.debian.org/%s/lastest/debian-%s-genericcloud-%s.img'
|
||||||
% (self.release, self.release, self.arch),
|
% (self.release, self.release, self.arch),
|
||||||
'-O', '%s/base.img' % self.autopkgtest_dir.name])
|
'-O', '%s/base.img' % self.autopkgtest_dir.name])
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user