if(TARGET lldb-server)
list(APPEND LLDB_TEST_DEPS lldb-server)
endif()
-
+
if(TARGET debugserver)
if(NOT CMAKE_HOST_APPLE OR LLDB_CODESIGN_IDENTITY)
list(APPEND LLDB_TEST_DEPS debugserver)
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
# All tests are currently flaky on Windows, so rerun them all once when they fail.
set(LLDB_TEST_COMMON_ARGS ${LLDB_TEST_COMMON_ARGS} --rerun-all-issues)
-
+
set(LLDB_TEST_DEBUG_TEST_CRASHES
0
CACHE BOOL "(Windows only) Enables debugging of tests in the test suite by showing the crash dialog when lldb crashes")
"Testing LLDB (parallel execution, with a separate subprocess per test)"
)
+# Generate a wrapper for dotest.py in the bin directory.
+string (REPLACE ";" " " LLDB_DOTEST_ARGS_STR "${LLDB_DOTEST_ARGS}")
+# We need this to substitute variables.
+configure_file(
+ llvm-dotest.in
+ ${CMAKE_CURRENT_BINARY_DIR}/llvm-dotest.configured
+ )
+# We need this to expand the generator expressions.
+file(GENERATE
+ OUTPUT
+ $<TARGET_FILE_DIR:lldb>/llvm-dotest
+ INPUT
+ ${CMAKE_CURRENT_BINARY_DIR}/llvm-dotest.configured
+ )
+
# If we're building with an in-tree clang, then list clang as a dependency
# to run tests.
if (TARGET clang)
--- /dev/null
+#!/usr/bin/env python
+import sys
+import os
+
+dotest_path = '@LLDB_SOURCE_DIR@/test/dotest.py'
+dotest_args = '@LLDB_DOTEST_ARGS_STR@'
+
+if __name__ == '__main__':
+ # FIXME: It would be nice if we can mimic the approach taken by llvm-lit
+ # and pass a python configuration straight to dotest, rather than going
+ # through the operating system.
+ command = '{} -q {} {}'.format(dotest_path, dotest_args, ' '.join(
+ sys.argv[1:]))
+ os.system(command)