Author: Jonas Devlieghere Date: 2020-09-29T23:05:12-07:00 New Revision: 154860af338f7b0c82cb04e91d6f199aa72cfdff
URL: https://github.com/llvm/llvm-project/commit/154860af338f7b0c82cb04e91d6f199aa72cfdff DIFF: https://github.com/llvm/llvm-project/commit/154860af338f7b0c82cb04e91d6f199aa72cfdff.diff LOG: [lldb] Use config.lldb_src_root in lit_config.load_config (NFC) Rather than relaying on CMake to substitute the full path to the lldb source root, use the value set in config.lldb_src_root. This makes it slightly easier to write a custom lit.site.cfg.py. Added: Modified: lldb/test/API/lit.site.cfg.py.in lldb/test/Shell/lit.site.cfg.py.in lldb/test/Unit/lit.site.cfg.py.in Removed: ################################################################################ diff --git a/lldb/test/API/lit.site.cfg.py.in b/lldb/test/API/lit.site.cfg.py.in index 0481e8fecc73..ce2ff8e21d0b 100644 --- a/lldb/test/API/lit.site.cfg.py.in +++ b/lldb/test/API/lit.site.cfg.py.in @@ -69,4 +69,4 @@ except KeyError as e: lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) # Let the main config do the real work. -lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/API/lit.cfg.py") +lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "API", "lit.cfg.py")) diff --git a/lldb/test/Shell/lit.site.cfg.py.in b/lldb/test/Shell/lit.site.cfg.py.in index ff4de9d527de..6cddd3937628 100644 --- a/lldb/test/Shell/lit.site.cfg.py.in +++ b/lldb/test/Shell/lit.site.cfg.py.in @@ -6,6 +6,7 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.llvm_libs_dir = "@LLVM_LIBS_DIR@" config.llvm_shlib_dir = "@SHLIBDIR@" config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" +config.lldb_src_root = "@LLDB_SOURCE_DIR@" config.lldb_obj_root = "@LLDB_BINARY_DIR@" config.lldb_libs_dir = "@LLDB_LIBS_DIR@" config.lldb_tools_dir = "@LLDB_TOOLS_DIR@" @@ -42,4 +43,4 @@ import lit.llvm lit.llvm.initialize(lit_config, config) # Let the main config do the real work. -lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/Shell/lit.cfg.py") +lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "Shell", "lit.cfg.py")) diff --git a/lldb/test/Unit/lit.site.cfg.py.in b/lldb/test/Unit/lit.site.cfg.py.in index e2035d678cd9..c0627b772362 100644 --- a/lldb/test/Unit/lit.site.cfg.py.in +++ b/lldb/test/Unit/lit.site.cfg.py.in @@ -26,4 +26,4 @@ import lit.llvm lit.llvm.initialize(lit_config, config) # Let the main config do the real work. -lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/Unit/lit.cfg.py") +lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "Unit", "lit.cfg.py")) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits