Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure tests the modify same git repo don't execute at the same time #446

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions testing/cpm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ add_cmake_config_test( cpm_gbench-simple.cmake )
add_cmake_config_test( cpm_gtest-export.cmake )
add_cmake_config_test( cpm_gtest-simple.cmake )

add_cmake_config_test( cpm_libcudacxx-after_cpmfind.cmake )
add_cmake_config_test( cpm_libcudacxx-after_cpmfind.cmake SERIAL)
add_cmake_config_test( cpm_libcudacxx-export.cmake )
add_cmake_config_test( cpm_libcudacxx-simple.cmake )
add_cmake_build_test( cpm_libcudacxx-verify-install-custom-libdir )

add_cmake_config_test( cpm_nvbench-export.cmake )
add_cmake_config_test( cpm_nvbench-simple.cmake )
add_cmake_config_test( cpm_nvbench-already-found-fmt.cmake )
add_cmake_build_test( cpm_nvbench-conda.cmake )
add_cmake_build_test( cpm_nvbench-conda-fmt.cmake )
add_cmake_config_test( cpm_nvbench-export.cmake SERIAL )
add_cmake_config_test( cpm_nvbench-simple.cmake SERIAL)
add_cmake_config_test( cpm_nvbench-already-found-fmt.cmake SERIAL)
add_cmake_build_test( cpm_nvbench-conda.cmake SERIAL)
add_cmake_build_test( cpm_nvbench-conda-fmt.cmake SERIAL)

add_cmake_config_test( cpm_nvcomp-export.cmake )
add_cmake_config_test( cpm_nvcomp-proprietary-off.cmake )
Expand Down
2 changes: 1 addition & 1 deletion testing/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if(RAPIDS_CMAKE_TESTING_GPU_COUNT GREATER 0)
add_cmake_ctest_test(add-allocation-simple)
add_cmake_ctest_test(add-allocation-throws-runtime-error)
add_cmake_ctest_test(add-multi-allocations-same-gpu)
add_cmake_ctest_test(add-multi-jobs-single-gpu)
add_cmake_ctest_test(add-multi-jobs-single-gpu SERIAL)
add_cmake_ctest_test(no_add-with-cpp-handler-from-docs)
add_cmake_ctest_test(no_add-with-no-resource-spec)
endif()
Expand Down
14 changes: 13 additions & 1 deletion testing/utils/cmake_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ adds a test for each generator:

add_cmake_build_test( (config|build|test|install)
<SourceOrDir>
[SERIAL]
[SHOULD_FAIL <expected error message string>]
)

Expand All @@ -57,7 +58,7 @@ adds a test for each generator:

#]=======================================================================]
function(add_cmake_test mode source_or_dir)
set(options)
set(options SERIAL)
set(one_value SHOULD_FAIL)
set(multi_value)
cmake_parse_arguments(RAPIDS_TEST "${options}" "${one_value}" "${multi_value}" ${ARGN})
Expand Down Expand Up @@ -141,6 +142,17 @@ function(add_cmake_test mode source_or_dir)
message(FATAL_ERROR "${mode} mode not one of the valid modes (config|build|install) by add_cmake_build_test")
endif()

if(RAPIDS_TEST_SERIAL)
set_tests_properties(${test_name} PROPERTIES RUN_SERIAL ON)
if(TEST ${test_name}_configure)
message(STATUS "${test_name}_configure is serial")
robertmaynard marked this conversation as resolved.
Show resolved Hide resolved
set_tests_properties(${test_name}_configure PROPERTIES RUN_SERIAL ON)
endif()
if(TEST ${test_name}_build)
set_tests_properties(${test_name}_build PROPERTIES RUN_SERIAL ON)
endif()
endif()

if(RAPIDS_TEST_SHOULD_FAIL)
# Make sure we have a match
set_tests_properties(${test_name} PROPERTIES WILL_FAIL ON)
Expand Down