# SPDX-License-Identifier: LGPL-2.1-or-later
efi_config_h_dir = meson.current_build_dir()
-efi_addon = ''
+efi_addon = []
libefitest = static_library(
'efitest',
# This is supposed to match exactly one time
if name == 'addon@0@.efi.stub'.format(efi_arch)
- efi_addon = exe.full_path()
+ efi_addon = [exe]
endif
test('check-alignment-@0@'.format(name),
check_efi_alignment_py,
- args : exe.full_path(),
+ args : exe,
suite : 'boot')
endforeach
# The last two don't get installed anywhere, one of them needs to included in
# the rpm spec file definition instead.
+rpm_depends = []
+
foreach tuple : in_files
file = tuple[0]
- custom_target(
+ rpm_depends += custom_target(
file,
input : file + '.in',
output : file,
build_by_default : want_tests != 'false')
path = run_command(sh, '-c', 'echo "$PATH"', check: true).stdout().strip()
-test_env = environment()
+test_env = {
+ 'PATH' : meson.project_build_root() + ':' + path,
+ 'PROJECT_BUILD_ROOT' : meson.project_build_root(),
+ 'SYSTEMD_SLOW_TESTS' : want_slow_tests ? '1' : '0',
+ 'PYTHONDONTWRITEBYTECODE' : '1',
+}
if conf.get('ENABLE_LOCALED') == 1
- test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
-endif
-test_env.set('PATH', meson.project_build_root() + ':' + path)
-test_env.set('PROJECT_BUILD_ROOT', meson.project_build_root())
-test_env.set('SYSTEMD_SLOW_TESTS', want_slow_tests ? '1' : '0')
-test_env.set('PYTHONDONTWRITEBYTECODE', '1')
-
-if efi_addon != ''
- test_env.set('EFI_ADDON', efi_addon)
+ test_env += {'SYSTEMD_LANGUAGE_FALLBACK_MAP' : language_fallback_map}
endif
############################################################
test('test-rpm-macros',
test_rpm_macros,
suite : 'dist',
- args : [meson.project_build_root()])
+ args : [meson.project_build_root()],
+ depends : rpm_depends)
endif
else
message('Skipping test-rpm-macros since rpm and/or rpmspec are not available')