From: Maxim Cournoyer Date: Mon, 20 Dec 2021 04:19:50 +0000 (-0500) Subject: testsuite: introspection: Do not override environment variables. X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~19^2~5^2~25^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=29e6cc58088ef37bfde364965cdebd2f7402f315;p=gtk4.git testsuite: introspection: Do not override environment variables. Functional package managers such as GNU Guix rely on environment variables such as GI_TYPELIB_PATH to discover the system libraries and resources; extend rather than override them. * testsuite/introspection/meson.build (env): New variable that extends rather than override the GI_TYPELIB_PATH and LD_PRELOAD environment variables. (api): Use the above as the value of the 'env' keyword argument. --- diff --git a/testsuite/introspection/meson.build b/testsuite/introspection/meson.build index 647150055c..048e47e6eb 100644 --- a/testsuite/introspection/meson.build +++ b/testsuite/introspection/meson.build @@ -1,10 +1,12 @@ py = import('python').find_installation('python3', modules: ['gi']) +env = environment() +env.prepend('GI_TYPELIB_PATH', + join_paths(project_build_root, 'gtk'), + gi_dep.get_pkgconfig_variable('typelibdir')) +env.prepend('LD_PRELOAD', join_paths(project_build_root, 'gtk', 'libgtk-4.so')) + test('api', find_program('api.py', dirs: meson.current_source_dir()), suite: ['introspection'], - env: [ - 'GI_TYPELIB_PATH=@0@/gtk:@1@'.format(project_build_root, - gi_dep.get_pkgconfig_variable('typelibdir')), - 'LD_PRELOAD=@0@/gtk/libgtk-4.so'.format(project_build_root), - ]) + env: env)