python: Fix unit tests running against system libgstreamer
Unit tests for which `i.get(2, [])` is empty were not adding testsenv_ld_library_path to LD_LIBRARY_PATH. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9148>
This commit is contained in:
parent
841448cd94
commit
f7c52a22a0
@ -87,18 +87,16 @@ foreach i: tests
|
||||
foreach j: i.get(2, [])
|
||||
path = meson.project_build_root() / '..' / j
|
||||
env.append('GI_TYPELIB_PATH', path)
|
||||
|
||||
if build_machine.system() == 'windows'
|
||||
env.append('PATH', path)
|
||||
env.append('PATH', testsenv_ld_library_path)
|
||||
elif build_machine.system() == 'linux'
|
||||
env.append('LD_LIBRARY_PATH', path)
|
||||
env.append('LD_LIBRARY_PATH', testsenv_ld_library_path)
|
||||
else
|
||||
env.append('DYLD_LIBRARY_PATH', path)
|
||||
env.append('DYLD_LIBRARY_PATH', testsenv_ld_library_path)
|
||||
endif
|
||||
testsenv_ld_library_path += path
|
||||
endforeach
|
||||
|
||||
if build_machine.system() == 'windows'
|
||||
env.append('PATH', testsenv_ld_library_path)
|
||||
elif build_machine.system() == 'linux'
|
||||
env.append('LD_LIBRARY_PATH', testsenv_ld_library_path)
|
||||
else
|
||||
env.append('DYLD_LIBRARY_PATH', testsenv_ld_library_path)
|
||||
endif
|
||||
|
||||
test(test_name, python, args: [runtests, i.get(1)], env: env)
|
||||
endforeach
|
||||
|
Loading…
x
Reference in New Issue
Block a user