forked from OSchip/llvm-project
[lldb] Hoist --server argument out of LLDB_TEST_COMMON_ARGS (NFC)
Give the server argument its own variable (LLDB_TEST_SERVER) so that we can configure it in lit.site.cfg.py if we so desire.
This commit is contained in:
parent
d0667562e1
commit
3c7070f1a6
|
@ -119,12 +119,12 @@ if(CMAKE_HOST_APPLE)
|
|||
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")
|
||||
|
@ -146,6 +146,7 @@ if(LLDB_BUILT_STANDALONE)
|
|||
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)
|
||||
|
@ -174,6 +175,7 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${dotest_args_replacement} LLDB_TEST_COMPILER
|
|||
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(
|
||||
|
|
|
@ -200,6 +200,9 @@ if is_configured('filecheck'):
|
|||
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]
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ config.test_compiler = '@LLDB_TEST_COMPILER@'
|
|||
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")
|
||||
|
@ -59,6 +60,7 @@ try:
|
|||
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:
|
||||
|
|
|
@ -28,6 +28,7 @@ if(LLDB_BUILT_STANDALONE)
|
|||
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)
|
||||
|
@ -41,6 +42,7 @@ if(LLDB_BUILT_STANDALONE)
|
|||
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.
|
||||
|
@ -53,6 +55,7 @@ if(LLDB_BUILT_STANDALONE)
|
|||
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()
|
||||
|
||||
|
@ -73,6 +76,7 @@ elseif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
|
|||
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(
|
||||
|
@ -90,6 +94,7 @@ else()
|
|||
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(
|
||||
|
|
|
@ -11,6 +11,7 @@ compiler = '@LLDB_TEST_COMPILER_CONFIGURED@'
|
|||
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@"
|
||||
|
@ -29,6 +30,9 @@ if __name__ == '__main__':
|
|||
cmd.extend(['--yaml2obj', yaml2obj])
|
||||
cmd.extend(['--filecheck', filecheck])
|
||||
cmd.extend(['--lldb-libs-dir', lldb_libs_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'])
|
||||
|
|
Loading…
Reference in New Issue