aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/lldbtest.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-06-26 16:12:08 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-06-26 16:12:08 +0000
commitc8232e4310751ffa9fe506c1f6c11cbaa02b4621 (patch)
tree3306817693a97e2952f424581633eecc703ef450 /lldb/packages/Python/lldbsuite/test/lldbtest.py
parent039af0ea03f987654a162b6160399a00fd22b1b0 (diff)
downloadllvm-c8232e4310751ffa9fe506c1f6c11cbaa02b4621.zip
llvm-c8232e4310751ffa9fe506c1f6c11cbaa02b4621.tar.gz
llvm-c8232e4310751ffa9fe506c1f6c11cbaa02b4621.tar.bz2
[dotest] Add the ability to set environment variables for the inferior.
This patch adds a dotest flag for setting environment variables for the inferior. This is different from the current --env flag, which sets variables in the debugger's environment. This allows us to set things like LD_LIBRARY_PATH for testing. Differential revision: https://reviews.llvm.org/D63790 llvm-svn: 364443
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 019a24b..0fbdfd8 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1856,6 +1856,9 @@ 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"'