1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-25 18:50:18 +03:00

Minor fixes for ukify tests (#36197)

This commit is contained in:
Luca Boccassi 2025-01-28 18:49:42 +00:00 committed by GitHub
commit c4c3eb03fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,7 @@ ADDITIONAL_DEPS=(
python3-pyparsing
python3-pytest
rpm
systemd-boot-efi
zstd
)

View File

@ -59,6 +59,8 @@ except ValueError:
slow_tests = True
arg_tools = ['--tools', build_root] if build_root else []
if build_root and pathlib.Path(f"{build_root}/linux{ukify.guess_efi_arch()}.efi.stub").exists():
arg_tools += ['--stub', f"{build_root}/linux{ukify.guess_efi_arch()}.efi.stub"]
def systemd_measure():
opts = ukify.create_parser().parse_args(arg_tools)
@ -409,6 +411,8 @@ def test_help_error(capsys):
@pytest.fixture(scope='session')
def kernel_initrd():
items = sorted(glob.glob('/lib/modules/*/vmlinuz'))
if not items:
items = sorted(glob.glob('/boot/vmlinuz*'))
if not items:
return None
@ -657,7 +661,7 @@ def test_inspect(kernel_initrd, tmp_path, capsys):
f'--os-release={osrel_arg}',
f'--uname={uname_arg}',
f'--output={output}',
]
] + arg_tools
if slow_tests:
args += [
f'--secureboot-certificate={cert.name}',