diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-02-09 22:08:26 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-02-09 22:08:26 +0000 |
commit | 95a0f39e35040e7385cfde680721c1ea578a1d0f (patch) | |
tree | 581af353d0c38dc938dd087d71c0ab18caa51d9f /lldb/packages/Python/lldbsuite/test | |
parent | a60f4621ae3ac1ce7aa7f9f6877597e37d0d9014 (diff) | |
download | bcm5719-llvm-95a0f39e35040e7385cfde680721c1ea578a1d0f.tar.gz bcm5719-llvm-95a0f39e35040e7385cfde680721c1ea578a1d0f.zip |
Make LLDB's clang module cache path customizable
This patch makes LLDB's clang module cache path customizable via
settings set target.clang-modules-cache-path <path> and uses it in the
LLDB testsuite to reuse the same location inside the build directory
for LLDB and clang.
Differential Revision: https://reviews.llvm.org/D43099
llvm-svn: 324775
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 8 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py | 11 |
2 files changed, 13 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 40d46a5fb0e..3443eccb43b 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1914,6 +1914,14 @@ class TestBase(Base): # decorators. Base.setUp(self) + # Set the clang modules cache path. + if self.child: + assert(self.getDebugInfo() == 'default') + mod_cache = os.path.join(self.getBuildDir(), "module-cache") + self.runCmd("settings set target.clang-modules-cache-path " + + mod_cache) + + if "LLDB_MAX_LAUNCH_COUNT" in os.environ: self.maxLaunchCount = int(os.environ["LLDB_MAX_LAUNCH_COUNT"]) diff --git a/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py b/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py index 2df2dc7b61b..59b325f5798 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py +++ b/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py @@ -15,21 +15,20 @@ import re import sys from lldbsuite.test.decorators import * -from lldbsuite.test import lldbtest +from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbtest_config -class DarwinNSLogOutputTestCase(lldbtest.TestBase): +class DarwinNSLogOutputTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True - - mydir = lldbtest.TestBase.compute_mydir(__file__) + mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin @skipIfRemote # this test is currently written using lldb commands & assumes running on local system def setUp(self): # Call super's setUp(). - super(DarwinNSLogOutputTestCase, self).setUp() + TestBase.setUp(self) self.child = None self.child_prompt = '(lldb) ' self.strict_sources = False @@ -42,7 +41,7 @@ class DarwinNSLogOutputTestCase(lldbtest.TestBase): self.d = {'OBJC_SOURCES': self.source, 'EXE': self.exe_name} # Locate breakpoint. - self.line = lldbtest.line_number(self.source, '// break here') + self.line = line_number(self.source, '// break here') def tearDown(self): # Shut down the process if it's still running. |