Skip to content

Commit

Permalink
[CMake] Connecting check-all and test-depends targets correctly
Browse files Browse the repository at this point in the history
My previous attempt at this connected the sub-project check targets to the test-depends target instead of to the check-all target. That resulted in the tests running multiple times on bots that built "test-depends" and "check-all" in separate build invocations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280392 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Chris Bieneman committed Sep 1, 2016
1 parent add0a5d commit 816c475
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -822,17 +822,22 @@ if( LLVM_INCLUDE_TESTS )
get_property(LLVM_LIT_PARAMS GLOBAL PROPERTY LLVM_LIT_PARAMS)
get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS)
get_property(LLVM_LIT_EXTRA_ARGS GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS)
get_property(LLVM_ADDITIONAL_TEST_TARGETS
GLOBAL PROPERTY LLVM_ADDITIONAL_TEST_TARGETS)
get_property(LLVM_ADDITIONAL_TEST_DEPENDS
GLOBAL PROPERTY LLVM_ADDITIONAL_TEST_DEPENDS)
add_lit_target(check-all
"Running all regression tests"
${LLVM_LIT_TESTSUITES}
PARAMS ${LLVM_LIT_PARAMS}
DEPENDS ${LLVM_LIT_DEPENDS}
DEPENDS ${LLVM_LIT_DEPENDS} ${LLVM_ADDITIONAL_TEST_TARGETS}
ARGS ${LLVM_LIT_EXTRA_ARGS}
)
if(TARGET check-runtimes)
add_dependencies(check-all check-runtimes)
endif()
add_custom_target(test-depends DEPENDS ${LLVM_LIT_DEPENDS})
add_custom_target(test-depends
DEPENDS ${LLVM_LIT_DEPENDS} ${LLVM_ADDITIONAL_TEST_DEPENDS})
set_target_properties(test-depends PROPERTIES FOLDER "Tests")
endif()

Expand Down
3 changes: 2 additions & 1 deletion runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ else() # if this is included from LLVM's CMake
${SUB_INSTALL_TARGETS}
USE_TOOLCHAIN)
if(LLVM_INCLUDE_TESTS)
set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS runtimes-test-depends)
set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_DEPENDS runtimes-test-depends)
set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_TARGETS check-runtimes)
endif()
endif()
endif()

0 comments on commit 816c475

Please sign in to comment.