diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-10 17:27:09 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-10 17:27:09 +0000 |
commit | 27c23653aec79e447193281f2f29da15d8bb1bf9 (patch) | |
tree | c019c448c0e39f2303e1d0a50130afd63eab0c9c /lldb/packages/Python/lldbsuite/test/dotest.py | |
parent | 2d2cf936ac6c80fdc851fbd489c192e9bd8c4e9a (diff) | |
download | bcm5719-llvm-27c23653aec79e447193281f2f29da15d8bb1bf9.tar.gz bcm5719-llvm-27c23653aec79e447193281f2f29da15d8bb1bf9.zip |
[test] Use a different module cache for Shell and API tests.
Before the test reorganization, everything was part of a single test
suite with a single module cache. Now that things are properly separated
this is no longer the case. Only the shell tests inherited the logic to
properly configure and wipe the module caches. This patch adds that
logic back for the API tests. While doing so, I noticed that we were
configuring a Clang module cache in CMake, but weren't actually using it
from dotest.py. I included a fix for that in this patch as well.
Differential revision: https://reviews.llvm.org/D68755
llvm-svn: 374386
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 652a02e5ed6..7b5414ee32d 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -426,11 +426,18 @@ def parseOptionsAndInitTestdirs(): configuration.lldb_platform_working_dir = args.lldb_platform_working_dir if args.test_build_dir: configuration.test_build_dir = args.test_build_dir - if args.module_cache_dir: - configuration.module_cache_dir = args.module_cache_dir + if args.lldb_module_cache_dir: + configuration.lldb_module_cache_dir = args.lldb_module_cache_dir else: - configuration.module_cache_dir = os.path.join(configuration.test_build_dir, - 'module-cache-lldb') + configuration.lldb_module_cache_dir = os.path.join( + configuration.test_build_dir, 'module-cache-lldb') + if args.clang_module_cache_dir: + configuration.clang_module_cache_dir = args.clang_module_cache_dir + else: + configuration.clang_module_cache_dir = os.path.join( + configuration.test_build_dir, 'module-cache-clang') + + os.environ['CLANG_MODULE_CACHE_DIR'] = configuration.clang_module_cache_dir # Gather all the dirs passed on the command line. if len(args.args) > 0: |