[libc][NFC] Remove extra ; in exhaustive_test.h. (#124216)
[llvm-project.git] / lldb / test / API / lang / objc / modules-cache / TestClangModulesCache.py
blob6ba46fef675265ee200b7246207a8d51650df887
1 """Test that the clang modules cache directory can be controlled."""
4 import os
5 import shutil
7 import lldb
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
13 class ObjCModulesTestCase(TestBase):
14 NO_DEBUG_INFO_TESTCASE = True
16 def test_expr(self):
17 self.build()
18 self.main_source_file = lldb.SBFileSpec("main.m")
19 self.runCmd("settings set target.auto-import-clang-modules true")
20 mod_cache = self.getBuildArtifact("my-clang-modules-cache")
21 if os.path.isdir(mod_cache):
22 shutil.rmtree(mod_cache)
23 self.assertFalse(os.path.isdir(mod_cache), "module cache should not exist")
24 self.runCmd('settings set symbols.clang-modules-cache-path "%s"' % mod_cache)
25 self.runCmd(
26 'settings set target.clang-module-search-paths "%s"' % self.getSourceDir()
28 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
29 self, "Set breakpoint here", self.main_source_file
31 self.runCmd("expr @import Foo")
32 self.assertTrue(os.path.isdir(mod_cache), "module cache exists")