Chandler Carruth | f71b73d | 2012-08-07 08:33:04 | [diff] [blame] | 1 | # Test runner infrastructure for Clang-based tools. This configures the Clang |
| 2 | # test trees for use by Lit, and delegates to LLVM's lit test handlers. |
Chandler Carruth | 5f8cfa7 | 2012-08-07 07:09:14 | [diff] [blame] | 3 | # |
Chandler Carruth | f71b73d | 2012-08-07 08:33:04 | [diff] [blame] | 4 | # Note that currently we don't support stand-alone builds of Clang, you must |
| 5 | # be building Clang from within a combined LLVM+Clang checkout.. |
Chandler Carruth | 5f8cfa7 | 2012-08-07 07:09:14 | [diff] [blame] | 6 | |
Chandler Carruth | f71b73d | 2012-08-07 08:33:04 | [diff] [blame] | 7 | set(CLANG_TOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") |
| 8 | set(CLANG_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..") |
Chandler Carruth | 5f8cfa7 | 2012-08-07 07:09:14 | [diff] [blame] | 9 | |
Chandler Carruth | f71b73d | 2012-08-07 08:33:04 | [diff] [blame] | 10 | option(CLANG_TOOLS_TEST_USE_VG "Run Clang tools' tests under Valgrind" OFF) |
| 11 | if(CLANG_TOOLS_TEST_USE_VG) |
| 12 | set(CLANG_TOOLS_TEST_EXTRA_ARGS ${CLANG_TEST_EXTRA_ARGS} "--vg") |
| 13 | endif() |
| 14 | |
Edwin Vane | 08085af | 2013-02-19 19:08:10 | [diff] [blame^] | 15 | add_subdirectory(cpp11-migrate) |
| 16 | |
| 17 | set(TEST_SOURCE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) |
| 18 | set(TEST_EXEC_ROOT ${CMAKE_CURRENT_BINARY_DIR}) |
| 19 | set(TESTSUITE_NAME "Clang Tools") |
| 20 | configure_lit_site_cfg( |
| 21 | ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in |
| 22 | ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg |
| 23 | ) |
| 24 | |
Chandler Carruth | f71b73d | 2012-08-07 08:33:04 | [diff] [blame] | 25 | set(CLANG_TOOLS_TEST_DEPS |
| 26 | # Base line deps. |
| 27 | clang clang-headers FileCheck count not |
| 28 | |
Edwin Vane | 08085af | 2013-02-19 19:08:10 | [diff] [blame^] | 29 | # cpp11-migrate auto-generated tests. See cpp11-migrate/CMakeLists.txt. |
| 30 | cpp11-migrate-autogen |
| 31 | |
Chandler Carruth | f71b73d | 2012-08-07 08:33:04 | [diff] [blame] | 32 | # Individual tools we test. |
Alexander Kornienko | 574cf4b | 2013-01-14 13:57:05 | [diff] [blame] | 33 | remove-cstr-calls cpp11-migrate clang-format |
Chandler Carruth | 5f8cfa7 | 2012-08-07 07:09:14 | [diff] [blame] | 34 | ) |
| 35 | |
Chandler Carruth | f71b73d | 2012-08-07 08:33:04 | [diff] [blame] | 36 | add_lit_testsuite(check-clang-tools "Running the Clang extra tools' regression tests" |
| 37 | ${CMAKE_CURRENT_BINARY_DIR} |
Edwin Vane | 08085af | 2013-02-19 19:08:10 | [diff] [blame^] | 38 | ${CMAKE_CURRENT_BINARY_DIR}/cpp11-migrate/autogen |
Chandler Carruth | f71b73d | 2012-08-07 08:33:04 | [diff] [blame] | 39 | DEPENDS ${CLANG_TOOLS_TEST_DEPS} |
| 40 | ARGS ${CLANG_TOOLS_TEST_EXTRA_ARGS} |
| 41 | ) |
| 42 | set_target_properties(check-clang-tools PROPERTIES FOLDER "Clang extra tools' tests") |