elseif(TARGET debugserver)
set(debugserver_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/debugserver)
message(STATUS "LLDB Tests use just-built debugserver: ${debugserver_path}")
- list(APPEND LLDB_TEST_COMMON_ARGS --server ${debugserver_path})
+ set(LLDB_TEST_SERVER ${debugserver_path})
add_lldb_test_dependency(debugserver)
elseif(TARGET lldb-server)
set(lldb_server_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb-server)
message(STATUS "LLDB Tests use just-built lldb-server: ${lldb_server_path}")
- list(APPEND LLDB_TEST_COMMON_ARGS --server ${lldb_server_path})
+ set(LLDB_TEST_SERVER ${lldb_server_path})
add_lldb_test_dependency(lldb-server)
else()
message(WARNING "LLDB Tests enabled, but no server available")
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_DSYMUTIL "${LLDB_TEST_DSYMUTIL}")
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_FILECHECK "${LLDB_TEST_FILECHECK}")
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_YAML2OBJ "${LLDB_TEST_YAML2OBJ}")
+ string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_SERVER "${LLDB_TEST_SERVER}")
# Remaining ones must be paths to the provided LLVM build-tree.
if(LLVM_CONFIGURATION_TYPES)
string(REPLACE ${CMAKE_CFG_INTDIR} ${dotest_args_replacement} LLDB_TEST_DSYMUTIL "${LLDB_TEST_DSYMUTIL}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${dotest_args_replacement} LLDB_TEST_FILECHECK "${LLDB_TEST_FILECHECK}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${dotest_args_replacement} LLDB_TEST_YAML2OBJ "${LLDB_TEST_YAML2OBJ}")
+string(REPLACE ${CMAKE_CFG_INTDIR} ${dotest_args_replacement} LLDB_TEST_SERVER "${LLDB_TEST_SERVER}")
# Configure the API test suite.
configure_lit_site_cfg(
if is_configured('yaml2obj'):
dotest_cmd += ['--yaml2obj', config.yaml2obj]
+if is_configured('server'):
+ dotest_cmd += ['--server', config.server]
+
if is_configured('lldb_libs_dir'):
dotest_cmd += ['--lldb-libs-dir', config.lldb_libs_dir]
config.dsymutil = '@LLDB_TEST_DSYMUTIL@'
config.filecheck = '@LLDB_TEST_FILECHECK@'
config.yaml2obj = '@LLDB_TEST_YAML2OBJ@'
+config.server = '@LLDB_TEST_SERVER@'
# The API tests use their own module caches.
config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-api")
config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-api")
config.dsymutil = config.dsymutil % lit_config.params
config.filecheck = config.filecheck % lit_config.params
config.yaml2obj = config.yaml2obj % lit_config.params
+ config.server = config.server % lit_config.params
config.lldb_framework_dir = config.lldb_framework_dir % lit_config.params
config.dotest_args_str = config.dotest_args_str % lit_config.params
except KeyError as e:
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_DSYMUTIL_CONFIGURED "${LLDB_TEST_DSYMUTIL}")
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_FILECHECK_CONFIGURED "${LLDB_TEST_FILECHECK}")
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
+ string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
# Remaining ones must be paths to the provided LLVM build-tree.
if(${config_type} IN_LIST LLVM_CONFIGURATION_TYPES)
string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} LLDB_TEST_DSYMUTIL_CONFIGURED "${LLDB_TEST_DSYMUTIL}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} LLDB_TEST_FILECHECK_CONFIGURED "${LLDB_TEST_FILECHECK}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} LLDB_LIBS_DIR_CONFIGURED "${LLDB_LIBS_DIR}")
else()
# Single-configuration generator like Ninja.
string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_TEST_DSYMUTIL_CONFIGURED "${LLDB_TEST_DSYMUTIL}")
string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_TEST_FILECHECK_CONFIGURED "${LLDB_TEST_FILECHECK}")
string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
+ string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_LIBS_DIR_CONFIGURED "${LLDB_LIBS_DIR}")
endif()
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TEST_DSYMUTIL_CONFIGURED "${LLDB_TEST_DSYMUTIL}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TEST_FILECHECK_CONFIGURED "${LLDB_TEST_FILECHECK}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_LIBS_DIR_CONFIGURED "${LLDB_LIBS_DIR}")
configure_file(
set(LLDB_TEST_DSYMUTIL_CONFIGURED "${LLDB_TEST_DSYMUTIL}")
set(LLDB_TEST_FILECHECK_CONFIGURED "${LLDB_TEST_FILECHECK}")
set(LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
+ set(LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
set(LLDB_LIBS_DIR_CONFIGURED "${LLDB_LIBS_DIR}")
configure_file(
dsymutil = '@LLDB_TEST_DSYMUTIL_CONFIGURED@'
filecheck = '@LLDB_TEST_FILECHECK_CONFIGURED@'
yaml2obj = '@LLDB_TEST_YAML2OBJ_CONFIGURED@'
+server = '@LLDB_TEST_SERVER_CONFIGURED@'
lldb_libs_dir = "@LLDB_LIBS_DIR_CONFIGURED@"
lldb_framework_dir = "@LLDB_FRAMEWORK_DIR_CONFIGURED@"
lldb_build_intel_pt = "@LLDB_BUILD_INTEL_PT@"
cmd.extend(['--yaml2obj', yaml2obj])
cmd.extend(['--filecheck', filecheck])
cmd.extend(['--lldb-libs-dir', lldb_libs_dir])
- cmd.extend(['--framework', lldb_framework_dir])
+ if server:
+ cmd.extend(['--server', server])
+ if lldb_framework_dir:
+ cmd.extend(['--framework', lldb_framework_dir])
if lldb_build_intel_pt == "1":
cmd.extend(['--enable-plugin', 'intel-pt'])
cmd.extend(wrapper_args)