tests/gutils-user-database: do not hardcode library name

Use build_tgt.full_path() and import('fs').name()
This commit is contained in:
Luca Bacci 2023-09-25 19:15:04 +02:00
parent 41c9c51080
commit 91b41f5234

View File

@ -226,23 +226,22 @@ else
'unix' : {},
}
if have_rtld_next and glib_build_shared
getpwuid_preload = shared_library('getpwuid-preload',
'getpwuid-preload.c',
name_prefix : '',
dependencies: libdl_dep,
install_dir : installed_tests_execdir,
install_tag : 'tests',
install: installed_tests_enabled)
glib_tests += {
'gutils-user-database' : {
'depends' : [
shared_library('getpwuid-preload',
'getpwuid-preload.c',
name_prefix : '',
dependencies: libdl_dep,
install_dir : installed_tests_execdir,
install_tag : 'tests',
install: installed_tests_enabled,
),
],
'depends' : [],
'env' : {
'LD_PRELOAD': '@0@/getpwuid-preload.so'.format(meson.current_build_dir()),
'LD_PRELOAD': getpwuid_preload.full_path()
},
'installed_tests_env' : {
'LD_PRELOAD': '@0@/getpwuid-preload.so'.format(installed_tests_execdir),
'LD_PRELOAD': installed_tests_execdir / fs.name(getpwuid_preload.full_path())
},
},
}