mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 03:46:46 +00:00

1. This commit adds LLDB_TEST_PLATFORM_URL, LLDB_TEST_SYSROOT, LLDB_TEST_PLATFORM_WORKING_DIR, LLDB_SHELL_TESTS_DISABLE_REMOTE cmake flags to pass arguments for cross-compilation and remote running of both Shell&API tests. 2. To run Shell tests remotely, it adds 'platform select' and 'platform connect' commands to %lldb substitution. 3. 'remote-linux' feature added to lit to disable tests failing with remote execution. 4. A separate working directory is assigned to each test to avoid conflicts during parallel test execution. 5. Remote Shell testing is run only when LLDB_TEST_SYSROOT is set for building test sources. The recommended compiler for that is Clang. --------- Co-authored-by: Vladimir Vereschaka <vvereschaka@accesssoftek.com>
44 lines
2.2 KiB
Python
44 lines
2.2 KiB
Python
@LIT_SITE_CFG_IN_HEADER@
|
|
|
|
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
|
|
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
|
|
config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
|
|
config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
|
|
config.llvm_shlib_dir = lit_config.substitute("@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 = lit_config.substitute("@LLDB_LIBS_DIR@")
|
|
config.lldb_tools_dir = lit_config.substitute("@LLDB_TOOLS_DIR@")
|
|
config.lldb_platform_url = lit_config.substitute("@LLDB_TEST_PLATFORM_URL@")
|
|
config.lldb_platform_working_dir = lit_config.substitute("@LLDB_TEST_PLATFORM_WORKING_DIR@")
|
|
# Since it comes from the command line, it may have backslashes which
|
|
# should not need to be escaped.
|
|
config.lldb_lit_tools_dir = lit_config.substitute(r"@LLDB_LIT_TOOLS_DIR@")
|
|
config.cmake_sysroot = lit_config.substitute("@LLDB_TEST_SYSROOT@" or "@DEFAULT_SYSROOT@")
|
|
config.has_libcxx = @LLDB_HAS_LIBCXX@
|
|
config.enable_remote = not @LLDB_TEST_SHELL_DISABLE_REMOTE@
|
|
config.libcxx_libs_dir = "@LIBCXX_LIBRARY_DIR@"
|
|
config.target_triple = "@LLVM_TARGET_TRIPLE@"
|
|
config.python_executable = "@Python3_EXECUTABLE@"
|
|
config.have_zlib = @LLVM_ENABLE_ZLIB@
|
|
config.objc_gnustep_dir = "@LLDB_TEST_OBJC_GNUSTEP_DIR@"
|
|
config.lldb_enable_lzma = @LLDB_ENABLE_LZMA@
|
|
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
|
config.lldb_bitness = 64 if @LLDB_IS_64_BITS@ else 32
|
|
config.lldb_enable_python = @LLDB_ENABLE_PYTHON@
|
|
config.lldb_enable_lua = @LLDB_ENABLE_LUA@
|
|
config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@"
|
|
config.have_lldb_server = @LLDB_TOOL_LLDB_SERVER_BUILD@
|
|
config.lldb_system_debugserver = @LLDB_USE_SYSTEM_DEBUGSERVER@
|
|
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
|
|
# The shell tests use their own module caches.
|
|
config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-shell")
|
|
config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-shell")
|
|
|
|
import lit.llvm
|
|
lit.llvm.initialize(lit_config, config)
|
|
|
|
# Let the main config do the real work.
|
|
lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "Shell", "lit.cfg.py"))
|