[Lldb-commits] [lldb] r367054 - [dotest] Set environment variables after potentialy clearing others.
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 25 13:54:41 PDT 2019
Author: jdevlieghere
Date: Thu Jul 25 13:54:41 2019
New Revision: 367054
URL: http://llvm.org/viewvc/llvm-project?rev=367054&view=rev
Log:
[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.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=367054&r1=367053&r2=367054&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Jul 25 13:54:41 2019
@@ -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"])
More information about the lldb-commits
mailing list