forked from OSchip/llvm-project
[dotest] Set environment variables after potentialy clearing others.
Dotest contains code to clear DYLD_LIBRARY_PATH for the inferior to not propagate sanitized builds. However, it's possible that we want to inject a different library path with `--inferior-env`. To make that work correctly, we need to do that *after* clearing DYLD_LIBRARY_PATH. llvm-svn: 367054
This commit is contained in:
parent
007f674c6a
commit
2fa67f442a
|
@ -1851,9 +1851,6 @@ class TestBase(Base):
|
|||
# decorators.
|
||||
Base.setUp(self)
|
||||
|
||||
if lldbtest_config.inferior_env:
|
||||
self.runCmd('settings set target.env-vars {}'.format(lldbtest_config.inferior_env))
|
||||
|
||||
# Set the clang modules cache path used by LLDB.
|
||||
mod_cache = os.path.join(os.environ["LLDB_BUILD"], "module-cache-lldb")
|
||||
self.runCmd('settings set symbols.clang-modules-cache-path "%s"'
|
||||
|
@ -1871,6 +1868,10 @@ class TestBase(Base):
|
|||
if 'DYLD_LIBRARY_PATH' in os.environ:
|
||||
self.runCmd('settings set target.env-vars DYLD_LIBRARY_PATH=')
|
||||
|
||||
# Set environment variables for the inferior.
|
||||
if lldbtest_config.inferior_env:
|
||||
self.runCmd('settings set target.env-vars {}'.format(lldbtest_config.inferior_env))
|
||||
|
||||
if "LLDB_MAX_LAUNCH_COUNT" in os.environ:
|
||||
self.maxLaunchCount = int(os.environ["LLDB_MAX_LAUNCH_COUNT"])
|
||||
|
||||
|
|
Loading…
Reference in New Issue