mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 00:13:40 +02:00
tests: Expand PATH for Python tests on Windows
This works around a Meson bug
(https://github.com/mesonbuild/meson/issues/4668).
If we have a Python test which spawns a built native binary, that binary is
listed in the `depends` argument of the `test()`. On Linux, this results in
the directories containing the built libraries which the binary depends on
being added to the `LD_LIBRARY_PATH` of the test invocation. On Windows,
however, Meson currently doesn’t add those directories to `PATH` (which is
the equivalent of `LD_LIBRARY_PATH`), so we have to do it manually.
This takes the same approach as Christoph Reiter did in
gobject-introspection
(13e8c7ff80/tests/meson.build (L2)
).
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
@@ -1176,6 +1176,9 @@ endforeach
|
||||
python_test_env = test_env
|
||||
python_test_env.prepend('PYTHONPATH', python_test_libraries_path)
|
||||
python_test_env.prepend('PYTHONPATH', python_test_libraries_built)
|
||||
if python_test_env_common_path.length() > 0
|
||||
python_test_env.prepend('PATH', python_test_env_common_path)
|
||||
endif
|
||||
|
||||
foreach test_name, extra_args : python_tests
|
||||
depends = [extra_args.get('depends', [])]
|
||||
|
Reference in New Issue
Block a user