diff options
author | Daniel Malea <daniel.malea@intel.com> | 2013-02-28 23:11:46 +0000 |
---|---|---|
committer | Daniel Malea <daniel.malea@intel.com> | 2013-02-28 23:11:46 +0000 |
commit | 931b17c70549e9a932da87045106a2b15399becb (patch) | |
tree | cc7ff78b64cd2ce27b7a47fdcda58e20aa5e8d6e /lldb/test/CMakeLists.txt | |
parent | 33ebf836bce6e4343badf83ba75a61dac804dc8c (diff) | |
download | bcm5719-llvm-931b17c70549e9a932da87045106a2b15399becb.tar.gz bcm5719-llvm-931b17c70549e9a932da87045106a2b15399becb.zip |
Finish up CMake support for LLDB (tested on Linux)
- add missing scripts (driver, tests, etc...)
- enable running of tests from cmake with "make check-lldb" target
- fix up problem with clang dependencies (this enables parallel builds)
- implement platform-specific FIXMEs in source/CMakeLists.txt
llvm-svn: 176306
Diffstat (limited to 'lldb/test/CMakeLists.txt')
-rw-r--r-- | lldb/test/CMakeLists.txt | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt new file mode 100644 index 00000000000..84648093e68 --- /dev/null +++ b/lldb/test/CMakeLists.txt @@ -0,0 +1,51 @@ +function(add_python_test_target name test_script args comment) + set(PYTHON_TEST_COMMAND + ${PYTHON_EXECUTABLE} + ${test_script} + ${args} + ) + + add_custom_target(${name} + COMMAND ${PYTHON_TEST_COMMAND} ${ARG_DEFAULT_ARGS} + COMMENT "${comment}" + ) +endfunction() + +# Users can override LLDB_TEST_ARGS to modify the way LLDB tests are run. See help below. +set(LLDB_TEST_ARGS + -C + ${CMAKE_C_COMPILER} + CACHE STRING "Specify compiler(s) and architecture(s) with which run LLDB tests. For example: '-C gcc -C clang -A i386 -A x86_64'" + ) +string(REPLACE " " ";" LLDB_TEST_ARGS ${LLDB_TEST_ARGS}) + +set(LLDB_TRACE_DIR "${CMAKE_BINARY_DIR}/lldb-test-traces" + CACHE STRING "Set directory to output LLDB test traces (for tests that do not pass.)" + ) + +set(LLDB_COMMON_TEST_ARGS + #--headers + #${LLDB_SOURCE_DIR}/include + --executable + ${CMAKE_BINARY_DIR}/bin/lldb + -s + ${LLDB_TRACE_DIR} + ) + +add_python_test_target(check-lldb-single + ${LLDB_SOURCE_DIR}/test/dotest.py + "${LLDB_COMMON_TEST_ARGS};${LLDB_TEST_ARGS}" + "Testing LLDB with args: ${LLDB_COMMON_TEST_ARGS};${LLDB_TEST_ARGS}" + ) + +set(LLDB_DOSEP_ARGS + -o;\"-q;${LLDB_COMMON_TEST_ARGS};${LLDB_TEST_ARGS}\" + ) + +# If tests crash cause LLDB to crash, or things are otherwise unstable, or if machine-parsable +# output is desired (i.e. in continuous integration contexts) check-lldb-sep is a better target. +add_python_test_target(check-lldb + ${LLDB_SOURCE_DIR}/test/dosep.ty + "${LLDB_DOSEP_ARGS}" + "Testing LLDB (with a separate subprocess per test) with args: ${LLDB_COMMON_TEST_ARGS};${LLDB_TEST_ARGS}" + ) |