diff options
-rw-r--r-- | lldb/test/CMakeLists.txt | 19 | ||||
-rwxr-xr-x | lldb/test/llvm-dotest.in | 14 |
2 files changed, 31 insertions, 2 deletions
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index d41e75fbe78..38a50a9808c 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -25,7 +25,7 @@ endif() 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) @@ -78,7 +78,7 @@ set(LLDB_TEST_COMMON_ARGS 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") @@ -129,6 +129,21 @@ add_python_test_target(check-lldb "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) diff --git a/lldb/test/llvm-dotest.in b/lldb/test/llvm-dotest.in new file mode 100755 index 00000000000..b6a108025fb --- /dev/null +++ b/lldb/test/llvm-dotest.in @@ -0,0 +1,14 @@ +#!/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) |