summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/sanity
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/sanity
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/sanity')
-rw-r--r--lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py b/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py
new file mode 100644
index 00000000000..2ce00d4e7ca
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py
@@ -0,0 +1,22 @@
+"""
+This is a sanity check that verifies that the module cache path is set
+correctly and points inside the default test build directory.
+"""
+
+from __future__ import print_function
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+
+class ModuleCacheSanityTestCase(TestBase):
+
+ mydir = TestBase.compute_mydir(__file__)
+
+ NO_DEBUG_INFO_TESTCASE = True
+
+ def test(self):
+ self.expect(
+ 'settings show symbols.clang-modules-cache-path',
+ substrs=['lldb-test-build.noindex', 'module-cache-lldb'])
OpenPOWER on IntegriCloud