diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-12-19 23:19:50 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-12-20 11:22:41 -0500 |
commit | 29e6cc58088ef37bfde364965cdebd2f7402f315 (patch) | |
tree | b71a32e72148e6f688c90c6ab9653288bf20a708 /testsuite | |
parent | 4b3247576a3e108ded2f4ce72a7ce476460c9f1a (diff) | |
download | gtk+-29e6cc58088ef37bfde364965cdebd2f7402f315.tar.gz |
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.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/introspection/meson.build | 12 |
1 files changed, 7 insertions, 5 deletions
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) |