diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-25 20:54:41 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-25 20:54:41 +0000 |
commit | 2fa67f442a373db61c74a93fe7272f60e50bf6bc (patch) | |
tree | cc4df9812b66da20675c6642e8906b21099ca180 /lldb/packages/Python/lldbsuite | |
parent | 007f674c6a4e47cf3a290c0e2d5ba96483d0f8dc (diff) | |
download | bcm5719-llvm-2fa67f442a373db61c74a93fe7272f60e50bf6bc.tar.gz bcm5719-llvm-2fa67f442a373db61c74a93fe7272f60e50bf6bc.zip |
[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
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index a252644735c..daa56e7ba49 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -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"]) |