summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lldbtest.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-29 18:37:05 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-29 18:37:05 +0000
commitff5982aa91d1ca0c11e00b3d2b22d32c66bb8590 (patch)
treea8d230f08520483336b9502d6722c4225aba5756 /lldb/packages/Python/lldbsuite/test/lldbtest.py
parent5a43fdd3139640116fc18d82cb1b6d2788def156 (diff)
downloadbcm5719-llvm-ff5982aa91d1ca0c11e00b3d2b22d32c66bb8590.tar.gz
bcm5719-llvm-ff5982aa91d1ca0c11e00b3d2b22d32c66bb8590.zip
[test] Fix various module cache bugs and inconsistencies
Currently, lit tests don't set neither the module cache for building inferiors nor the module cache used by lldb when running tests. Furthermore, we have several places where we rely on the path to the module cache being always the same, rather than passing the correct value around. This makes it hard to specify a different module cache path when debugging a a test. This patch reworks how we determine and pass around the module cache paths and fixes the omission on the lit side. It also adds a sanity check to the lit and dotest suites. Differential revision: https://reviews.llvm.org/D66966 llvm-svn: 370394
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 6c00350167d..48dc81780e9 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1852,9 +1852,9 @@ class TestBase(Base):
Base.setUp(self)
# 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"'
- % mod_cache)
+ self.runCmd(
+ 'settings set symbols.clang-modules-cache-path "{}"'.format(
+ configuration.module_cache_dir))
for s in self.setUpCommands():
self.runCmd(s)
@@ -2058,13 +2058,13 @@ class TestBase(Base):
if check:
output = ""
if self.res.GetOutput():
- output += "\nCommand output:\n" + self.res.GetOutput()
+ output += "\nCommand output:\n" + self.res.GetOutput()
if self.res.GetError():
- output += "\nError output:\n" + self.res.GetError()
+ output += "\nError output:\n" + self.res.GetError()
if msg:
- msg += output
+ msg += output
if cmd:
- cmd += output
+ cmd += output
self.assertTrue(self.res.Succeeded(),
msg if (msg) else CMD_MSG(cmd))
OpenPOWER on IntegriCloud