Skip to content

Commit

Permalink
Add check-polly-tests build target.
Browse files Browse the repository at this point in the history
The check-polly-tests target runs regression/unit tests but without checking
formatting. This is useful to not having to reload a file in an open editor
(which eg. clears the undo buffer, moves cursor/window position) when running
polly-update-format.

After this change, the following test targets exist:
 - check-polly-unittests to run unittests only
 - check-polly-tests to run unit and regression tests
 - polly-check-format to check formatting using clang-format
 - check-polly to run them all

As a side-effect, when running check-polly, polly-check-format and run in
parallel (instead of polly-check-format first).

Differential Revision: https://reviews.llvm.org/D24191

llvm-svn: 280654
  • Loading branch information
Meinersbur committed Sep 5, 2016
1 parent cd369a3 commit 5645797
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions polly/test/CMakeLists.txt
Expand Up @@ -12,6 +12,9 @@ set(POLLY_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")
set(POLLY_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..")
set(LLVM_SHLIBEXT "${CMAKE_SHARED_MODULE_SUFFIX}")

add_custom_target(check-polly)
set_target_properties(check-polly PROPERTIES FOLDER "Polly")

if (NOT DEFINED LLVM_MAIN_SRC_DIR)

# We are building polly out of tree, adjust the settings.
Expand Down Expand Up @@ -67,7 +70,7 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
set_target_properties(polly-test-${testdir} PROPERTIES FOLDER "Polly")
endforeach()

add_custom_target(check-polly
add_custom_target(check-polly-tests
COMMAND ${LLVM_LIT}
--param polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
--param polly_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
Expand All @@ -76,7 +79,8 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${POLLY_TEST_DEPS}
COMMENT "Running Polly regression/unit tests")
set_target_properties(check-polly PROPERTIES FOLDER "Polly")
set_target_properties(check-polly-tests PROPERTIES FOLDER "Polly")
add_dependencies(check-polly check-polly-tests)

if (POLLY_GTEST_AVAIL)
configure_file(
Expand Down Expand Up @@ -113,14 +117,14 @@ else (NOT DEFINED LLVM_MAIN_SRC_DIR)
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)

# Run regression and unit tests
add_lit_testsuite(check-polly "Running polly regression tests"
add_lit_testsuite(check-polly-tests "Running polly regression tests"
${CMAKE_CURRENT_BINARY_DIR}
PARAMS polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
polly_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
DEPENDS ${POLLY_TEST_DEPS}
)

set_target_properties(check-polly PROPERTIES FOLDER "Polly")
set_target_properties(check-polly-tests PROPERTIES FOLDER "Polly")
add_dependencies(check-polly check-polly-tests)

if (POLLY_GTEST_AVAIL)
configure_lit_site_cfg(
Expand Down

0 comments on commit 5645797

Please sign in to comment.