diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d00af147916..fe0461cbc4f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: run: | cmake -S . -B build -DCMAKE_BUILD_TYPE=RELEASE cd build - make -j4 unit_math_prim_rev_subtests + make -j4 test_unit_math_prim_rev_test cd test ctest -R "unit_math_prim_rev" @@ -93,7 +93,7 @@ jobs: run: | cmake -S . -B build -DCMAKE_BUILD_TYPE=RELEASE cd build - make -j4 unit_math_fwd_nonfun_mix_subtests + make -j4 test_unit_math_fwd_nonfun_mix_subtests cd test ctest -R "unit_math_fwd_nonfun_mix" @@ -134,7 +134,7 @@ jobs: run: | cmake -S . -B build -DCMAKE_BUILD_TYPE=RELEASE cd build - make -j4 test_unit_math_mix_fun + make -j4 test_unit_math_mix_fun_subtests cd test ctest -L "unit_math_mix_fun" diff --git a/Jenkinsfile b/Jenkinsfile index 7fb5dfb8522..fd722fd278b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -268,7 +268,7 @@ pipeline { sh ''' echo CXXFLAGS += -fsanitize=address >> make/local; cmake -S . -B \"build\" -DCMAKE_BUILD_TYPE=RELEASE; - cd build && make -j${PARALLEL} unit_math_subtests && + cd build && make -j24 test_unit_math_tests && \ cd test && ctest --output-on-failure -L "unit_math_subtest"; ''' } @@ -290,7 +290,7 @@ pipeline { } sh''' CXX=${CLANG_CXX} CC=${CLANG_CC} cmake -S . -B \"build\" -DCMAKE_BUILD_TYPE=RELEASE -DSTAN_OPENCL=ON -DSTAN_OPENCL_PLATFORM_ID=${OPENCL_PLATFORM_ID_GPU} -DSTAN_OPENCL_DEVICE_ID=${OPENCL_DEVICE_ID_GPU} && \ - cd build && make -j${PARALLEL} unit_math_opencl_subtests && cd test && ctest --output-on-failure -L "unit_math_opencl" + cd build && make -j24 test_unit_math_opencl_tests && cd test && ctest --output-on-failure -L "unit_math_opencl" ''' } } @@ -320,7 +320,7 @@ pipeline { echo CXX_TYPE=gcc >> make/local echo STAN_MPI=true >> make/local CXX=${MPICXX} cmake -S . -B \"build\" -DCMAKE_BUILD_TYPE=RELEASE -DSTAN_MPI=ON && \ - cd build && make -j${PARALLEL} unit_math_mpi_subtests && cd test && ctest --output-on-failure -L "unit_math_mpi_subtest" + cd build && make -j${PARALLEL} test_unit_math_mpi_tests && cd test && ctest --output-on-failure -L "unit_math_mpi_subtest" """ runTests("test/unit/math/prim/functor") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c753d275156..94c92f943f6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,26 @@ # Unit Tests +## Get all properties that cmake supports +execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST) +## Convert command output into a CMake list +STRING(REGEX REPLACE ";" "\\\\;" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}") +STRING(REGEX REPLACE "\n" ";" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}") + +list(REMOVE_DUPLICATES CMAKE_PROPERTY_LIST) + +function(print_target_properties tgt) + if(NOT TARGET ${tgt}) + message("There is no target named '${tgt}'") + return() + endif() + + foreach (prop ${CMAKE_PROPERTY_LIST}) + string(REPLACE "" "${CMAKE_BUILD_TYPE}" prop ${prop}) + get_target_property(propval ${tgt} ${prop}) + if (propval) + message ("${tgt} ${prop} = ${propval}") + endif() + endforeach(prop) +endfunction(print_target_properties) # Compile one test manually so that we can reuse precompile headers add_executable(dae_test ${CMAKE_CURRENT_SOURCE_DIR}/unit/math/rev/functor/pph_dae_typed_test.cpp) @@ -25,6 +47,7 @@ if (STAN_MPI) target_link_libraries(dae_test Boost::mpi MPI::MPI_CXX) endif() +define_property(TARGET PROPERTY SUB_TESTS BRIEF_DOCS "Subtests for a test target") # Adds a test target for # 1. Each directory under the specified test directory @@ -53,10 +76,11 @@ function(add_gtest_grouped_test test_directory folder_test_name target_pch) foreach(dir IN LISTS UNIQUE_DIRS) file(GLOB CPP_FILES_IN_DIR "${dir}/*test.cpp") list(APPEND ALL_TEST_FILES ${CPP_FILES_IN_DIR}) # Add files to global list - + message(STATUS "Adding test target for: ${dir}") # Generate a safe test target name from the directory path string(REPLACE "${CMAKE_SOURCE_DIR}/" "" RELATIVE_DIR ${dir}) string(REPLACE "/" "_" TEST_TARGET_NAME ${RELATIVE_DIR}) + message(STATUS "Test target name: ${TEST_TARGET_NAME}") if(TEST_TARGET_NAME STREQUAL "") set(TEST_TARGET_NAME "root") endif() @@ -65,10 +89,13 @@ function(add_gtest_grouped_test test_directory folder_test_name target_pch) if (NOT TARGET ${TEST_TARGET_NAME}) # Add executable and related commands only if there are source files if (CPP_FILES_IN_DIR) + set(ALL_SUB_TEST_TARGETS "") + # Build subtests foreach(cpp_file IN LISTS CPP_FILES_IN_DIR) string(REPLACE "${CMAKE_SOURCE_DIR}/" "" RELATIVE_FILE ${cpp_file}) string(REPLACE "/" "_" TMP_TEST_TARGET_NAME ${RELATIVE_FILE}) string(REPLACE ".cpp" "" SUB_TEST_TARGET_NAME ${TMP_TEST_TARGET_NAME}) + list(APPEND ALL_SUB_TEST_TARGETS ${SUB_TEST_TARGET_NAME}) add_executable(${SUB_TEST_TARGET_NAME} ${cpp_file}) target_include_directories(${SUB_TEST_TARGET_NAME} PRIVATE ${CMAKE_SOURCE_DIR}) target_precompile_headers(${SUB_TEST_TARGET_NAME} REUSE_FROM ${target_pch}) @@ -85,12 +112,21 @@ function(add_gtest_grouped_test test_directory folder_test_name target_pch) endif() # Register the test with CTest add_test(NAME ${SUB_TEST_TARGET_NAME} COMMAND ${SUB_TEST_TARGET_NAME}) + set_property(TEST ${SUB_TEST_TARGET_NAME} + PROPERTY LABELS ${TEST_TARGET_NAME}) endforeach() - message(STATUS "Adding grouped test ${TEST_TARGET_NAME} for ${dir}") + # target for all subtests + add_custom_target(${TEST_TARGET_NAME}_subtests) + add_dependencies(${TEST_TARGET_NAME}_subtests ${ALL_SUB_TEST_TARGETS}) + set_property(TARGET ${TEST_TARGET_NAME}_subtests PROPERTY SUBTESTS ${ALL_SUB_TEST_TARGETS}) + print_target_properties(${TEST_TARGET_NAME}_subtests) + message(STATUS "${TEST_TARGET_NAME}_subtests build") + + message(STATUS "${TEST_TARGET_NAME} grouped test for ${dir}") add_executable(${TEST_TARGET_NAME} ${CPP_FILES_IN_DIR}) # Configure target properties such as include directories and linked libraries target_include_directories(${TEST_TARGET_NAME} PRIVATE ${CMAKE_SOURCE_DIR}) - target_compile_options(${TEST_TARGET_NAME} PUBLIC -O1) + target_compile_options(${TEST_TARGET_NAME} PUBLIC -O1 -Wno-misleading-indentation) target_precompile_headers(${TEST_TARGET_NAME} REUSE_FROM ${target_pch}) target_link_libraries(${TEST_TARGET_NAME} gtest_main benchmark::benchmark TBB::tbb @@ -103,7 +139,7 @@ function(add_gtest_grouped_test test_directory folder_test_name target_pch) if (STAN_MPI) target_link_libraries(${TEST_TARGET_NAME} Boost::mpi MPI::MPI_CXX) endif() - +# message(STATUS "${ALL_TEST_TARGETS} ") # Register the test with CTest add_test(NAME ${TEST_TARGET_NAME} COMMAND ${TEST_TARGET_NAME}) list(APPEND ALL_TEST_TARGETS ${TEST_TARGET_NAME}) @@ -117,7 +153,7 @@ function(add_gtest_grouped_test test_directory folder_test_name target_pch) if(ALL_TEST_FILES) message(STATUS "Adding single test target for all tests ${folder_test_name}_test for ${test_directory}") add_executable(${folder_test_name}_test ${ALL_TEST_FILES}) - target_compile_options(${folder_test_name}_test PUBLIC -O1) + target_compile_options(${folder_test_name}_test PUBLIC -O1 -Wno-misleading-indentation) target_include_directories(${folder_test_name}_test PRIVATE ${CMAKE_SOURCE_DIR}) target_precompile_headers(${folder_test_name}_test REUSE_FROM ${target_pch}) target_link_libraries(${folder_test_name}_test @@ -135,12 +171,14 @@ function(add_gtest_grouped_test test_directory folder_test_name target_pch) # Register the combined test with CTest add_test(${test_directory}_test ${SINGLE_TARGET_HPP} COMMAND ${folder_test_name}_test) endif() + if (FALSE) if (ALL_TEST_TARGETS) - add_custom_target(${folder_test_name}_subtests) - add_dependencies(${folder_test_name}_subtests ${ALL_TEST_TARGETS}) - message(STATUS "Adding ${folder_test_name}_subtests to build") + add_custom_target(${folder_test_name}_subtests) + add_dependencies(${folder_test_name}_subtests ${ALL_TEST_TARGETS}) + message(STATUS "Adding ${folder_test_name}_subtests to build") message(STATUS "${ALL_TEST_TARGETS} ") endif() + endif() endfunction() diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index e041690961f..5f977eccd27 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -32,201 +32,165 @@ target_compile_options(unit_pch PRIVATE -O1) add_gtest_grouped_test(${CMAKE_CURRENT_SOURCE_DIR}/math unit_math unit_pch) message("Adding unit_math_opencl_subtests") -add_custom_target(unit_math_opencl_subtests) -add_dependencies(unit_math_opencl_subtests -test_unit_math_opencl test_unit_math_opencl_device_functions -test_unit_math_opencl_kernel_generator -test_unit_math_opencl_prim test_unit_math_opencl_rev) -set_property(TEST test_unit_math_opencl - PROPERTY LABELS "unit_math_opencl") -set_property(TEST test_unit_math_opencl_device_functions - PROPERTY LABELS "unit_math_opencl") -set_property(TEST test_unit_math_opencl_kernel_generator - PROPERTY LABELS "unit_math_opencl") -set_property(TEST test_unit_math_opencl_prim - PROPERTY LABELS "unit_math_opencl") -set_property(TEST test_unit_math_opencl_rev - PROPERTY LABELS "unit_math_opencl") +if (FALSE) + + +endif() + + +function(set_test_labels target label) + get_property(SUBTESTS TARGET test_unit_math_prim_functor_subtests PROPERTY MANUALLY_ADDED_DEPENDENCIES) + #loop over the subtests and and set the labels + foreach(subtest ${SUBTESTS}) + set_property(TEST ${subtest} PROPERTY LABELS label) + endforeach() +endfunction() + +function(newset_test_labels target label) + get_property(SUBTESTS TARGET ${target} PROPERTY MANUALLY_ADDED_DEPENDENCIES) + # Loop over the subtests + foreach(subtest ${SUBTESTS}) + string(FIND "${subtest}" "_test" INDEX REVERSE) + if(INDEX GREATER -1) + message("{subset} ends with the suffix.") + # Set the labels for tests ending with "_test" + set_property(TEST ${subtest} PROPERTY LABELS ${label}) + else() + message(STATUS "RECURSE on ${subtest}") + # Recursively call set_test_labels for other targets + set_test_labels(subtest ${label}) + endif() + endforeach() +endfunction() + +add_custom_target(test_unit_math_opencl_tests) +add_dependencies(test_unit_math_opencl_tests +test_unit_math_opencl_subtests test_unit_math_opencl_device_functions_subtests +test_unit_math_opencl_kernel_generator_subtests +test_unit_math_opencl_prim_subtests test_unit_math_opencl_rev_subtests) +newset_test_labels(test_unit_math_opencl_tests "unit_math_opencl") message("Adding unit_math_mix_subtests") -add_custom_target(unit_math_mix_subtests) -add_dependencies(unit_math_mix_subtests test_unit_math_mix_core - test_unit_math_mix_fun test_unit_math_mix_functor - test_unit_math_mix_meta test_unit_math_mix_prob) -set_property(TEST test_unit_math_mix_core - PROPERTY LABELS "unit_math_mix") -set_property(TEST test_unit_math_mix_fun - PROPERTY LABELS "unit_math_mix") -set_property(TEST test_unit_math_mix_fun - PROPERTY LABELS "unit_math_mix_fun") -set_property(TEST test_unit_math_mix_functor - PROPERTY LABELS "unit_math_mix") -set_property(TEST test_unit_math_mix_meta - PROPERTY LABELS "unit_math_mix") -set_property(TEST test_unit_math_mix_prob - PROPERTY LABELS "unit_math_mix") - -add_custom_target(unit_math_mix_nonfun_subtests) -add_dependencies(unit_math_mix_nonfun_subtests - test_unit_math_mix_core test_unit_math_mix_functor - test_unit_math_mix_meta test_unit_math_mix_prob) -set_property(TEST test_unit_math_mix_core - PROPERTY LABELS "unit_math_mix_nonfun") -set_property(TEST test_unit_math_mix_functor - PROPERTY LABELS "unit_math_mix_nonfun") -set_property(TEST test_unit_math_mix_meta - PROPERTY LABELS "unit_math_mix_nonfun") -set_property(TEST test_unit_math_mix_prob - PROPERTY LABELS "unit_math_mix_nonfun") +add_custom_target(test_unit_math_mix_tests) +add_dependencies(test_unit_math_mix_tests +test_unit_math_mix_core_subtests +test_unit_math_mix_fun_subtests +test_unit_math_mix_functor_subtests +test_unit_math_mix_constraint_subtests +test_unit_math_mix_meta_subtests +test_unit_math_mix_prob_subtests) +newset_test_labels(test_unit_math_mix_tests "unit_math_mix") +newset_test_labels(test_unit_math_mix_fun_subtests "unit_math_mix_fun") + +add_custom_target(test_unit_math_mix_nonfun_tests) +add_dependencies(test_unit_math_mix_nonfun_tests +test_unit_math_mix_core_subtests +test_unit_math_mix_functor_subtests +test_unit_math_mix_meta_subtests +test_unit_math_mix_prob_subtests) +newset_test_labels(test_unit_math_mix_nonfun_tests "unit_math_mix_nonfun") message("Adding unit_math_fwd_nonfun_mix_subtests") -add_custom_target(unit_math_fwd_nonfun_mix_subtests) -add_dependencies(unit_math_fwd_nonfun_mix_subtests - test_unit_math_mix_core test_unit_math_mix_functor - test_unit_math_mix_meta test_unit_math_mix_prob - test_unit_math_fwd_core test_unit_math_fwd_fun - test_unit_math_fwd_functor test_unit_math_fwd_meta - test_unit_math_fwd_prob) -set_property(TEST test_unit_math_fwd_core - PROPERTY LABELS "unit_math_fwd_nonfun_mix") -set_property(TEST test_unit_math_fwd_fun - PROPERTY LABELS "unit_math_fwd_nonfun_mix") -set_property(TEST test_unit_math_fwd_functor - PROPERTY LABELS "unit_math_fwd_nonfun_mix") -set_property(TEST test_unit_math_fwd_meta - PROPERTY LABELS "unit_math_fwd_nonfun_mix") -set_property(TEST test_unit_math_fwd_prob - PROPERTY LABELS "unit_math_fwd_nonfun_mix") -set_property(TEST test_unit_math_mix_core - PROPERTY LABELS "unit_math_fwd_nonfun_mix") -set_property(TEST test_unit_math_mix_functor - PROPERTY LABELS "unit_math_fwd_nonfun_mix") -set_property(TEST test_unit_math_mix_meta - PROPERTY LABELS "unit_math_fwd_nonfun_mix") -set_property(TEST test_unit_math_mix_prob - PROPERTY LABELS "unit_math_fwd_nonfun_mix") +add_custom_target(test_unit_math_fwd_nonfun_mix_tests) +add_dependencies(test_unit_math_fwd_nonfun_mix_tests + test_unit_math_fwd_core_subtests + test_unit_math_fwd_fun_subtests + test_unit_math_fwd_functor_subtests + test_unit_math_fwd_meta_subtests + test_unit_math_fwd_prob_subtests + test_unit_math_mix_core_subtests + test_unit_math_mix_functor_subtests + test_unit_math_mix_meta_subtests + test_unit_math_mix_prob_subtests) +newset_test_labels(test_unit_math_fwd_nonfun_mix_tests "unit_math_fwd_nonfun_mix") message("Adding unit_math_fwd_subtests") -add_custom_target(unit_math_fwd_subtests) -add_dependencies(unit_math_fwd_subtests - test_unit_math_fwd_core test_unit_math_fwd_fun - test_unit_math_fwd_functor test_unit_math_fwd_meta - test_unit_math_fwd_prob) -set_property(TEST test_unit_math_fwd_core - PROPERTY LABELS "unit_math_fwd") -set_property(TEST test_unit_math_fwd_fun - PROPERTY LABELS "unit_math_fwd") -set_property(TEST test_unit_math_fwd_functor - PROPERTY LABELS "unit_math_fwd") -set_property(TEST test_unit_math_fwd_meta - PROPERTY LABELS "unit_math_fwd") -set_property(TEST test_unit_math_fwd_prob - PROPERTY LABELS "unit_math_fwd") - -message("Adding unit_math_prim_subtests") -add_custom_target(unit_math_prim_subtests) -add_dependencies(unit_math_prim_subtests - test_unit_math_prim_core test_unit_math_prim_err - test_unit_math_prim_fun test_unit_math_prim_functor - test_unit_math_prim_meta test_unit_math_prim_prob) -set_property(TEST test_unit_math_prim_core - PROPERTY LABELS "unit_math_prim") -set_property(TEST test_unit_math_prim_err - PROPERTY LABELS "unit_math_prim") -set_property(TEST test_unit_math_prim_fun - PROPERTY LABELS "unit_math_prim") -set_property(TEST test_unit_math_prim_functor - PROPERTY LABELS "unit_math_prim") -set_property(TEST test_unit_math_prim_meta - PROPERTY LABELS "unit_math_prim") -set_property(TEST test_unit_math_prim_prob - PROPERTY LABELS "unit_math_prim") - -message("Adding unit_math_rev_subtests") -add_custom_target(unit_math_rev_subtests) -add_dependencies(unit_math_rev_subtests - test_unit_math_rev_core test_unit_math_rev_err - test_unit_math_rev_fun test_unit_math_rev_functor - test_unit_math_rev_meta test_unit_math_rev_prob) -set_property(TEST test_unit_math_rev_core - PROPERTY LABELS "unit_math_rev") -set_property(TEST test_unit_math_rev_err - PROPERTY LABELS "unit_math_rev") -set_property(TEST test_unit_math_rev_fun - PROPERTY LABELS "unit_math_rev") -set_property(TEST test_unit_math_rev_functor - PROPERTY LABELS "unit_math_rev") -set_property(TEST test_unit_math_rev_meta - PROPERTY LABELS "unit_math_rev") -set_property(TEST test_unit_math_rev_prob - PROPERTY LABELS "unit_math_rev") - -message("Adding unit_math_prim_rev_subtests") -add_custom_target(unit_math_prim_rev_subtests) -add_dependencies(unit_math_prim_rev_subtests - test_unit_math_prim_core test_unit_math_prim_err - test_unit_math_prim_fun test_unit_math_prim_functor - test_unit_math_prim_meta test_unit_math_prim_prob - test_unit_math_rev_core test_unit_math_rev_err - test_unit_math_rev_fun test_unit_math_rev_functor - test_unit_math_rev_meta test_unit_math_rev_prob) -set_property(TEST test_unit_math_prim_core - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_prim_err - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_prim_fun - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_prim_functor - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_prim_meta - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_prim_prob - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_rev_core - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_rev_err - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_rev_fun - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_rev_functor - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_rev_meta - PROPERTY LABELS "unit_math_prim_rev") -set_property(TEST test_unit_math_rev_prob - PROPERTY LABELS "unit_math_prim_rev") - -message("Adding unit_math_prim_subtests") -add_custom_target(unit_math_mpi_subtests) -add_dependencies(unit_math_mpi_subtests - test_unit_math_prim_functor test_unit_math_rev_functor) -set_property(TEST test_unit_math_prim_functor PROPERTY LABELS "unit_math_mpi_subtest") -set_property(TEST test_unit_math_rev_functor PROPERTY LABELS "unit_math_mpi_subtest") - - -set_property(TEST test_unit_math PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_fwd PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_fwd_core PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_fwd_fun PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_fwd_functor PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_fwd_meta PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_fwd_prob PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_memory PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_mix PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_mix_core PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_mix_fun PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_mix_functor PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_mix_meta PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_mix_prob PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_prim_core PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_prim_err PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_prim_fun PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_prim_functor PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_prim_meta PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_prim_prob PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_rev PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_rev_core PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_rev_err PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_rev_fun PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_rev_functor PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_rev_meta PROPERTY LABELS "unit_math_subtest") -set_property(TEST test_unit_math_rev_prob PROPERTY LABELS "unit_math_subtest") +add_custom_target(test_unit_math_fwd_tests) +add_dependencies(test_unit_math_fwd_tests + test_unit_math_fwd_core_subtests + test_unit_math_fwd_fun_subtests + test_unit_math_fwd_functor_subtests + test_unit_math_fwd_meta_subtests + test_unit_math_fwd_prob_subtests) + +newset_test_labels(test_unit_math_fwd_tests "unit_math_fwd") + +add_custom_target(test_unit_math_tests) +add_dependencies(test_unit_math_tests + test_unit_math_subtests + test_unit_math_fwd_subtests + test_unit_math_fwd_core_subtests + test_unit_math_fwd_fun_subtests + test_unit_math_fwd_functor_subtests + test_unit_math_fwd_meta_subtests + test_unit_math_fwd_prob_subtests + test_unit_math_memory_subtests + test_unit_math_mix_subtests + test_unit_math_mix_core_subtests + test_unit_math_mix_fun_subtests + test_unit_math_mix_functor_subtests + test_unit_math_mix_meta_subtests + test_unit_math_mix_prob_subtests + test_unit_math_prim_core_subtests + test_unit_math_prim_err_subtests + test_unit_math_prim_fun_subtests + test_unit_math_prim_functor_subtests + test_unit_math_prim_meta_subtests + test_unit_math_prim_prob_subtests + test_unit_math_rev_subtests + test_unit_math_rev_core_subtests + test_unit_math_rev_err_subtests + test_unit_math_rev_fun_subtests + test_unit_math_rev_functor_subtests + test_unit_math_rev_meta_subtests + test_unit_math_rev_prob_subtests) +newset_test_labels(test_unit_math_tests "unit_math_subtest") + + + +message("Adding unit_math_prim") +add_custom_target(test_unit_math_prim_tests) +add_dependencies(test_unit_math_prim_tests + test_unit_math_prim_core_subtests + test_unit_math_prim_err_subtests + test_unit_math_prim_fun_subtests + test_unit_math_prim_functor_subtests + test_unit_math_prim_meta_subtests + test_unit_math_prim_prob_subtests) +newset_test_labels(test_unit_math_prim_tests "unit_math_prim") + +message("Adding unit_math_rev") +add_custom_target(test_unit_math_rev_tests) +add_dependencies(test_unit_math_rev_tests + test_unit_math_rev_core_subtests + test_unit_math_rev_err_subtests + test_unit_math_rev_fun_subtests + test_unit_math_rev_functor_subtests + test_unit_math_rev_meta_subtests + test_unit_math_rev_prob_subtests) +newset_test_labels(test_unit_math_rev_tests "unit_math_rev") + + +message("Adding test_unit_math_prim_rev_tests") +add_custom_target(test_unit_math_prim_rev_tests) +add_dependencies(test_unit_math_prim_rev_tests + test_unit_math_prim_err_subtests + test_unit_math_prim_fun_subtests + test_unit_math_prim_functor_subtests + test_unit_math_prim_meta_subtests + test_unit_math_prim_prob_subtests + test_unit_math_rev_core_subtests + test_unit_math_rev_err_subtests + test_unit_math_rev_fun_subtests + test_unit_math_rev_functor_subtests + test_unit_math_rev_meta_subtests + test_unit_math_rev_prob_subtests) +newset_test_labels(test_unit_math_prim_rev_tests "unit_math_prim_rev") + + +message("Adding test_unit_math_mpi_subtests") +add_custom_target(test_unit_math_mpi_tests) +add_dependencies(test_unit_math_mpi_tests + test_unit_math_prim_functor_subtests test_unit_math_rev_functor_subtests) +newset_test_labels(test_unit_math_mpi_tests "unit_math_mpi_subtest") +