diff --git a/clang/utils/perf-training/CMakeLists.txt b/clang/utils/perf-training/CMakeLists.txt --- a/clang/utils/perf-training/CMakeLists.txt +++ b/clang/utils/perf-training/CMakeLists.txt @@ -1,7 +1,3 @@ - -# All test suites added here should be excuded from check-all -set(EXCLUDE_FROM_ALL On) - if (CMAKE_CFG_INTDIR STREQUAL ".") set(LLVM_BUILD_MODE ".") else () @@ -22,6 +18,7 @@ add_lit_testsuite(generate-profraw "Generating clang PGO data" ${CMAKE_CURRENT_BINARY_DIR}/pgo-data/ + EXCLUDE_FROM_CHECK_ALL DEPENDS clang clear-profraw ) @@ -52,6 +49,7 @@ add_lit_testsuite(generate-dtrace-logs "Generating clang dtrace data" ${CMAKE_CURRENT_BINARY_DIR}/order-files/ + EXCLUDE_FROM_CHECK_ALL ARGS -j 1 DEPENDS clang clear-dtrace-logs ) diff --git a/compiler-rt/test/asan/CMakeLists.txt b/compiler-rt/test/asan/CMakeLists.txt --- a/compiler-rt/test/asan/CMakeLists.txt +++ b/compiler-rt/test/asan/CMakeLists.txt @@ -13,10 +13,6 @@ message(WARNING "Disabling ASan tests because they are unreliable on Windows 7 and earlier") endif() -if (SHADOW_MAPPING_UNRELIABLE) - set(EXCLUDE_FROM_ALL TRUE) -endif() - macro(get_bits_for_arch arch bits) if (${arch} MATCHES "x86_64|powerpc64|powerpc64le|aarch64|arm64|mips64|mips64el|s390x|sparcv9") set(${bits} 64) @@ -82,7 +78,6 @@ # variable to select which iOS device or simulator to use, e.g.: # SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6" if(APPLE) - set(EXCLUDE_FROM_ALL ON) set(ASAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER}) set(ASAN_TEST_DYNAMIC True) set(ASAN_APPLE_PLATFORMS ${SANITIZER_COMMON_SUPPORTED_OS}) @@ -116,10 +111,10 @@ ) add_lit_testsuite(check-asan-${platform}-${arch} "AddressSanitizer ${platform} ${arch} tests" ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/ + EXCLUDE_FROM_CHECK_ALL DEPENDS ${ASAN_TEST_DEPS}) endforeach() endforeach() - set(EXCLUDE_FROM_ALL OFF) endif() # Add unit tests. @@ -145,8 +140,15 @@ endif() endif() +if (SHADOW_MAPPING_UNRELIABLE) + set(exclude_from_check_all.g "EXCLUDE_FROM_CHECK_ALL") +else() + set(exclude_from_check_all.g "") +endif() + add_lit_testsuite(check-asan "Running the AddressSanitizer tests" ${ASAN_TESTSUITES} + ${exclude_from_check_all} DEPENDS ${ASAN_TEST_DEPS}) set_target_properties(check-asan PROPERTIES FOLDER "Compiler-RT Misc") @@ -154,12 +156,8 @@ add_lit_testsuite(check-asan-dynamic "Running the AddressSanitizer tests with dynamic runtime" ${ASAN_DYNAMIC_TESTSUITES} + ${exclude_from_check_all.g} DEPENDS ${ASAN_DYNAMIC_TEST_DEPS}) set_target_properties(check-asan-dynamic PROPERTIES FOLDER "Compiler-RT Misc") endif() - -# Reset EXCLUDE_FROM_ALL to its initial value. -if (SHADOW_MAPPING_UNRELIABLE) - set(EXCLUDE_FROM_ALL FALSE) -endif() diff --git a/compiler-rt/test/fuzzer/CMakeLists.txt b/compiler-rt/test/fuzzer/CMakeLists.txt --- a/compiler-rt/test/fuzzer/CMakeLists.txt +++ b/compiler-rt/test/fuzzer/CMakeLists.txt @@ -89,7 +89,6 @@ endif() if (APPLE) - set(EXCLUDE_FROM_ALL ON) set(LIBFUZZER_TEST_COMPILER ${COMPILER_RT_TEST_COMPILER}) set(FUZZER_APPLE_PLATFORMS ${FUZZER_SUPPORTED_OS}) foreach(platform ${FUZZER_APPLE_PLATFORMS}) @@ -119,9 +118,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py ) add_lit_testsuite(check-fuzzer-${platform}-${arch} "libFuzzer ${platform} ${arch} tests" + EXCLUDE_FROM_CHECK_ALL ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/ DEPENDS ${LIBFUZZER_TEST_DEPS}) endforeach() endforeach() - set(EXCLUDE_FROM_ALL OFF) endif() diff --git a/compiler-rt/test/tsan/CMakeLists.txt b/compiler-rt/test/tsan/CMakeLists.txt --- a/compiler-rt/test/tsan/CMakeLists.txt +++ b/compiler-rt/test/tsan/CMakeLists.txt @@ -49,7 +49,6 @@ # variable to select which iOS device or simulator to use, e.g.: # SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6" if(APPLE) - set(EXCLUDE_FROM_ALL ON) set(TSAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER}) set(TSAN_APPLE_PLATFORMS ${TSAN_SUPPORTED_OS}) foreach(platform ${TSAN_APPLE_PLATFORMS}) @@ -80,10 +79,10 @@ ) add_lit_testsuite(check-tsan-${platform}-${arch} "ThreadSanitizer ${platform} ${arch} tests" ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/ + EXCLUDE_FROM_CHECK_ALL DEPENDS ${TSAN_TEST_DEPS}) endforeach() endforeach() - set(EXCLUDE_FROM_ALL OFF) endif() if(COMPILER_RT_INCLUDE_TESTS) diff --git a/compiler-rt/test/ubsan/CMakeLists.txt b/compiler-rt/test/ubsan/CMakeLists.txt --- a/compiler-rt/test/ubsan/CMakeLists.txt +++ b/compiler-rt/test/ubsan/CMakeLists.txt @@ -86,6 +86,7 @@ add_lit_testsuite(check-ubsan-${test_mode}-${platform}-${arch} "UBSan ${CONFIG_NAME} tests" ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/ + EXCLUDE_FROM_CHECK_ALL DEPENDS ${UBSAN_TEST_DEPS}) endmacro() @@ -102,7 +103,6 @@ # "check-asan-iossim-x86_64" and similar. They also require that an extra env # variable to select which iOS device or simulator to use, e.g.: # SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6" - set(EXCLUDE_FROM_ALL ON) set(UBSAN_APPLE_PLATFORMS ${SANITIZER_COMMON_SUPPORTED_OS}) foreach(platform ${UBSAN_APPLE_PLATFORMS}) list_intersect( @@ -127,7 +127,6 @@ endif() endforeach() endforeach() - set(EXCLUDE_FROM_ALL OFF) endif() add_lit_testsuite(check-ubsan "Running UndefinedBehaviorSanitizer tests" diff --git a/lldb/test/Shell/CMakeLists.txt b/lldb/test/Shell/CMakeLists.txt --- a/lldb/test/Shell/CMakeLists.txt +++ b/lldb/test/Shell/CMakeLists.txt @@ -21,6 +21,7 @@ "Running lldb shell test suite with reproducer capture" ${CMAKE_CURRENT_BINARY_DIR} PARAMS "lldb-run-with-repro=capture" + EXCLUDE_FROM_CHECK_ALL DEPENDS lldb-test-deps) # Add a lit test suite that runs the shell test by replaying a reproducer. @@ -28,5 +29,6 @@ "Running lldb shell test suite with reproducer replay" ${CMAKE_CURRENT_BINARY_DIR} PARAMS "lldb-run-with-repro=replay" + EXCLUDE_FROM_CHECK_ALL DEPENDS lldb-test-deps) add_dependencies(check-lldb-repro check-lldb-repro-capture) diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -1560,10 +1560,10 @@ # A function to add a set of lit test suites to be driven through 'check-*' targets. function(add_lit_testsuite target comment) - cmake_parse_arguments(ARG "" "" "PARAMS;DEPENDS;ARGS" ${ARGN}) + cmake_parse_arguments(ARG "EXCLUDE_FROM_CHECK_ALL" "" "PARAMS;DEPENDS;ARGS" ${ARGN}) # EXCLUDE_FROM_ALL excludes the test ${target} out of check-all. - if(NOT EXCLUDE_FROM_ALL) + if(NOT ARG_EXCLUDE_FROM_CHECK_ALL) # Register the testsuites, params and depends for the global check rule. set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${ARG_UNPARSED_ARGUMENTS}) set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${ARG_PARAMS}) @@ -1582,7 +1582,7 @@ function(add_lit_testsuites project directory) if (NOT LLVM_ENABLE_IDE) - cmake_parse_arguments(ARG "" "" "PARAMS;DEPENDS;ARGS" ${ARGN}) + cmake_parse_arguments(ARG "EXCLUDE_FROM_CHECK_ALL" "" "PARAMS;DEPENDS;ARGS" ${ARGN}) # Search recursively for test directories by assuming anything not # in a directory called Inputs contains tests. @@ -1605,6 +1605,7 @@ string(TOLOWER "${project}${name_dashes}" name_var) add_lit_target("check-${name_var}" "Running lit suite ${lit_suite}" ${lit_suite} + ${EXCLUDE_FROM_CHECK_ALL} PARAMS ${ARG_PARAMS} DEPENDS ${ARG_DEPENDS} ARGS ${ARG_ARGS} diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt --- a/llvm/test/CMakeLists.txt +++ b/llvm/test/CMakeLists.txt @@ -30,11 +30,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py ) -# Don't include check-llvm into check-all without LLVM_BUILD_TOOLS. -if(NOT LLVM_BUILD_TOOLS) - set(EXCLUDE_FROM_ALL ON) -endif() - # Set the depends list as a variable so that it can grow conditionally. # NOTE: Sync the substitutions in test/lit.cfg when adding to this list. set(LLVM_TEST_DEPENDS @@ -173,13 +168,21 @@ add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS}) set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests") +if(LLVM_BUILD_TOOLS) + set(exclude_from_check_all "EXCLUDE_FROM_CHECK_ALL") +else() + set(exclude_from_check_all "") +endif() + add_lit_testsuite(check-llvm "Running the LLVM regression tests" ${CMAKE_CURRENT_BINARY_DIR} + ${exclude_from_check_all} DEPENDS ${LLVM_TEST_DEPENDS} ) set_target_properties(check-llvm PROPERTIES FOLDER "Tests") add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR} + ${exclude_from_check_all} DEPENDS ${LLVM_TEST_DEPENDS} ) diff --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake --- a/openmp/cmake/OpenMPTesting.cmake +++ b/openmp/cmake/OpenMPTesting.cmake @@ -163,9 +163,9 @@ return() endif() - cmake_parse_arguments(ARG "" "" "DEPENDS;ARGS" ${ARGN}) - # EXCLUDE_FROM_ALL excludes the test ${target} out of check-openmp. - if (NOT EXCLUDE_FROM_ALL) + cmake_parse_arguments(ARG "EXCLUDE_FROM_CHECK_ALL" "" "DEPENDS;ARGS" ${ARGN}) + # EXCLUDE_FROM_CHECK_ALL excludes the test ${target} out of check-openmp. + if (NOT ARG_EXCLUDE_FROM_CHECK_ALL) # Register the testsuites and depends for the check-openmp rule. set_property(GLOBAL APPEND PROPERTY OPENMP_LIT_TESTSUITES ${ARG_UNPARSED_ARGUMENTS}) set_property(GLOBAL APPEND PROPERTY OPENMP_LIT_DEPENDS ${ARG_DEPENDS}) @@ -183,6 +183,7 @@ add_lit_testsuite(${target} ${comment} ${ARG_UNPARSED_ARGUMENTS} + ${ARG_EXCLUDE_FROM_CHECK_ALL} DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS} ARGS ${ARG_ARGS} ) @@ -194,6 +195,5 @@ get_property(OPENMP_LIT_DEPENDS GLOBAL PROPERTY OPENMP_LIT_DEPENDS) # We already added the testsuites themselves, no need to do that again. - set(EXCLUDE_FROM_ALL True) - add_openmp_testsuite(check-openmp "Running OpenMP tests" ${OPENMP_LIT_TESTSUITES} DEPENDS ${OPENMP_LIT_DEPENDS}) + add_openmp_testsuite(check-openmp "Running OpenMP tests" ${OPENMP_LIT_TESTSUITES} EXCLUDE_FROM_CHECK_ALL DEPENDS ${OPENMP_LIT_DEPENDS}) endfunction() diff --git a/openmp/libomptarget/deviceRTLs/nvptx/test/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/nvptx/test/CMakeLists.txt --- a/openmp/libomptarget/deviceRTLs/nvptx/test/CMakeLists.txt +++ b/openmp/libomptarget/deviceRTLs/nvptx/test/CMakeLists.txt @@ -8,11 +8,10 @@ set(deps ${deps} omptarget-nvptx-bc) endif() -# Don't run by default. -set(EXCLUDE_FROM_ALL True) # Run with only one thread to only launch one application to the GPU at a time. add_openmp_testsuite(check-libomptarget-nvptx "Running libomptarget-nvptx tests" ${CMAKE_CURRENT_BINARY_DIR} + EXCLUDE_FROM_CHECK_ALL DEPENDS ${deps} ARGS -j1) set(LIBOMPTARGET_NVPTX_TEST_FLAGS "" CACHE STRING diff --git a/openmp/runtime/test/CMakeLists.txt b/openmp/runtime/test/CMakeLists.txt --- a/openmp/runtime/test/CMakeLists.txt +++ b/openmp/runtime/test/CMakeLists.txt @@ -32,8 +32,7 @@ add_openmp_testsuite(check-libomp "Running libomp tests" ${CMAKE_CURRENT_BINARY_DIR} DEPENDS omp) # Add target check-ompt, but make sure to not add the tests twice to check-openmp. -set(EXCLUDE_FROM_ALL True) -add_openmp_testsuite(check-ompt "Running OMPT tests" ${CMAKE_CURRENT_BINARY_DIR}/ompt DEPENDS omp) +add_openmp_testsuite(check-ompt "Running OMPT tests" ${CMAKE_CURRENT_BINARY_DIR}/ompt EXCLUDE_FROM_CHECK_ALL DEPENDS omp) # Configure the lit.site.cfg.in file set(AUTO_GEN_COMMENT "## Autogenerated by libomp configuration.\n# Do not edit!")