We support a mode where the Clang regression tests are run but not the

Clang unit tests. It's not clear why we support this mode in builds
where LLVM is available (LLVM itself does not), but at least this makes
us support it correctly.

This also fixes a long-standing bug where we would pass the unit test
param flag to lit in the standalone build even though the standalone
build *never* has the unittests built and ready for testing.

llvm-svn: 159594
This commit is contained in:
Chandler Carruth 2012-07-02 21:37:04 +00:00
parent aec961811b
commit 3bf1d5d1de
1 changed files with 8 additions and 3 deletions

View File

@ -34,13 +34,19 @@ if( NOT CLANG_BUILT_STANDALONE )
clang-check
llvm-dis llc opt FileCheck count not
)
set(CLANG_TEST_PARAMS
clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
)
if(LLVM_INCLUDE_TESTS)
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
list(APPEND CLANG_TEST_PARAMS
clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
)
endif()
add_lit_testsuite(check-clang "Running the Clang regression tests"
${CMAKE_CURRENT_BINARY_DIR}
PARAMS clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
PARAMS ${CLANG_TEST_PARAMS}
DEPENDS ${CLANG_TEST_DEPS}
ARGS ${CLANG_TEST_EXTRA_ARGS}
)
@ -67,7 +73,6 @@ else()
COMMAND ${PYTHON_EXECUTABLE}
${LIT}
--param clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
--param clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
--param build_config=${CMAKE_CFG_INTDIR}
--param build_mode=${RUNTIME_BUILD_MODE}
${LIT_ARGS}