unittests: don't override LD_LIBRARY_PATH
part of using ICC is configuring LD_LIBRARY_PATH so that you can link
with several Intel specific .so's. Currently meson blanket overrides the
LD_LIBRARARY_PATH in several tests which breaks them. Instead prepend
the test dir td LD_LIBRARY_PATH. Fixes 6 tests with ICC.
@@ -3918,7 +3918,7 @@ class LinuxlikeTests(BasePlatformTests):
# when all tests are run (but works when only this test is run),
# but doing this explicitly works.
env = os.environ.copy()
- env['LD_LIBRARY_PATH'] = installed_libdir
+ env['LD_LIBRARY_PATH'] = ':'.join([installed_libdir, env.get('LD_LIBRARY_PATH', '')])
self.assertEqual(subprocess.call(installed_exe, env=env), 0)
# Ensure that introspect --installed works
installed = self.introspect('--installed')
@@ -4119,7 +4119,7 @@ endian = 'little'
self.init(testdir2)
self.build()
myenv = os.environ.copy()
- myenv['LD_LIBRARY_PATH'] = lib_dir
+ myenv['LD_LIBRARY_PATH'] = ':'.join([lib_dir, myenv.get('LD_LIBRARY_PATH', '')])
if is_cygwin():
bin_dir = os.path.join(tempdirname, 'bin')
myenv['PATH'] = bin_dir + os.pathsep + myenv['PATH']
