mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 01:55:22 +03:00
test/60-ukify: override stub location in tests
Without this, build would fail if the stub is not available in /usr/lib/.
This commit is contained in:
parent
f9a6cb0e13
commit
3f80c1393e
@ -2178,6 +2178,9 @@ public_programs = []
|
||||
# D-Bus introspection XML export
|
||||
dbus_programs = []
|
||||
|
||||
# A list of boot stubs. Required for testing of ukify.
|
||||
boot_stubs = []
|
||||
|
||||
basic_includes = include_directories(
|
||||
'src/basic',
|
||||
'src/fundamental',
|
||||
@ -4378,8 +4381,8 @@ endif
|
||||
|
||||
if want_tests != 'false' and want_kernel_install
|
||||
args = [kernel_install.full_path(), loaderentry_install, uki_copy_install]
|
||||
if want_ukify
|
||||
args += [ukify.full_path(), ukify_install]
|
||||
if want_ukify and boot_stubs.length() > 0
|
||||
args += [ukify.full_path(), ukify_install, boot_stubs[0]]
|
||||
endif
|
||||
|
||||
test('test-kernel-install',
|
||||
|
@ -334,7 +334,7 @@ foreach efi_elf_binary : efi_elf_binaries
|
||||
# FIXME: Use build_tgt.name() with meson >= 0.54.0
|
||||
name = fs.name(efi_elf_binary.full_path()).split('.')[0]
|
||||
name += name.startswith('linux') ? '.efi.stub' : '.efi'
|
||||
boot_targets += custom_target(
|
||||
exe = custom_target(
|
||||
name,
|
||||
output : name,
|
||||
input : efi_elf_binary,
|
||||
@ -351,6 +351,10 @@ foreach efi_elf_binary : efi_elf_binaries
|
||||
'@INPUT@',
|
||||
'@OUTPUT@',
|
||||
])
|
||||
boot_targets += exe
|
||||
if name.startswith('linux')
|
||||
boot_stubs += exe
|
||||
endif
|
||||
endforeach
|
||||
|
||||
alias_target('systemd-boot', boot_targets)
|
||||
|
@ -11,6 +11,7 @@ loaderentry_install="${2:?}"
|
||||
uki_copy_install="${3:?}"
|
||||
ukify="${4:-}"
|
||||
ukify_install="${5:-}"
|
||||
boot_stub="${6:-}"
|
||||
if [[ -d "${PROJECT_BUILD_ROOT:-}" ]]; then
|
||||
bootctl="${PROJECT_BUILD_ROOT}/bootctl"
|
||||
else
|
||||
@ -45,6 +46,7 @@ export BOOT_ROOT="$D/boot"
|
||||
export BOOT_MNT="$D/boot"
|
||||
export MACHINE_ID='3e0484f3634a418b8e6a39e8828b03e3'
|
||||
export KERNEL_INSTALL_UKIFY="$ukify"
|
||||
export KERNEL_INSTALL_BOOT_STUB="$boot_stub"
|
||||
|
||||
# Test type#1 installation
|
||||
"$kernel_install" -v add 1.1.1 "$D/sources/linux" "$D/sources/initrd"
|
||||
|
Loading…
Reference in New Issue
Block a user