mirror of
https://github.com/systemd/systemd
synced 2024-07-25 04:05:16 +00: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
|
# D-Bus introspection XML export
|
||||||
dbus_programs = []
|
dbus_programs = []
|
||||||
|
|
||||||
|
# A list of boot stubs. Required for testing of ukify.
|
||||||
|
boot_stubs = []
|
||||||
|
|
||||||
basic_includes = include_directories(
|
basic_includes = include_directories(
|
||||||
'src/basic',
|
'src/basic',
|
||||||
'src/fundamental',
|
'src/fundamental',
|
||||||
|
@ -4378,8 +4381,8 @@ endif
|
||||||
|
|
||||||
if want_tests != 'false' and want_kernel_install
|
if want_tests != 'false' and want_kernel_install
|
||||||
args = [kernel_install.full_path(), loaderentry_install, uki_copy_install]
|
args = [kernel_install.full_path(), loaderentry_install, uki_copy_install]
|
||||||
if want_ukify
|
if want_ukify and boot_stubs.length() > 0
|
||||||
args += [ukify.full_path(), ukify_install]
|
args += [ukify.full_path(), ukify_install, boot_stubs[0]]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test('test-kernel-install',
|
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
|
# FIXME: Use build_tgt.name() with meson >= 0.54.0
|
||||||
name = fs.name(efi_elf_binary.full_path()).split('.')[0]
|
name = fs.name(efi_elf_binary.full_path()).split('.')[0]
|
||||||
name += name.startswith('linux') ? '.efi.stub' : '.efi'
|
name += name.startswith('linux') ? '.efi.stub' : '.efi'
|
||||||
boot_targets += custom_target(
|
exe = custom_target(
|
||||||
name,
|
name,
|
||||||
output : name,
|
output : name,
|
||||||
input : efi_elf_binary,
|
input : efi_elf_binary,
|
||||||
|
@ -351,6 +351,10 @@ foreach efi_elf_binary : efi_elf_binaries
|
||||||
'@INPUT@',
|
'@INPUT@',
|
||||||
'@OUTPUT@',
|
'@OUTPUT@',
|
||||||
])
|
])
|
||||||
|
boot_targets += exe
|
||||||
|
if name.startswith('linux')
|
||||||
|
boot_stubs += exe
|
||||||
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
alias_target('systemd-boot', boot_targets)
|
alias_target('systemd-boot', boot_targets)
|
||||||
|
|
|
@ -11,6 +11,7 @@ loaderentry_install="${2:?}"
|
||||||
uki_copy_install="${3:?}"
|
uki_copy_install="${3:?}"
|
||||||
ukify="${4:-}"
|
ukify="${4:-}"
|
||||||
ukify_install="${5:-}"
|
ukify_install="${5:-}"
|
||||||
|
boot_stub="${6:-}"
|
||||||
if [[ -d "${PROJECT_BUILD_ROOT:-}" ]]; then
|
if [[ -d "${PROJECT_BUILD_ROOT:-}" ]]; then
|
||||||
bootctl="${PROJECT_BUILD_ROOT}/bootctl"
|
bootctl="${PROJECT_BUILD_ROOT}/bootctl"
|
||||||
else
|
else
|
||||||
|
@ -45,6 +46,7 @@ export BOOT_ROOT="$D/boot"
|
||||||
export BOOT_MNT="$D/boot"
|
export BOOT_MNT="$D/boot"
|
||||||
export MACHINE_ID='3e0484f3634a418b8e6a39e8828b03e3'
|
export MACHINE_ID='3e0484f3634a418b8e6a39e8828b03e3'
|
||||||
export KERNEL_INSTALL_UKIFY="$ukify"
|
export KERNEL_INSTALL_UKIFY="$ukify"
|
||||||
|
export KERNEL_INSTALL_BOOT_STUB="$boot_stub"
|
||||||
|
|
||||||
# Test type#1 installation
|
# Test type#1 installation
|
||||||
"$kernel_install" -v add 1.1.1 "$D/sources/linux" "$D/sources/initrd"
|
"$kernel_install" -v add 1.1.1 "$D/sources/linux" "$D/sources/initrd"
|
||||||
|
|
Loading…
Reference in a new issue