Skip to content

Commit

Permalink
remove ref resource type
Browse files Browse the repository at this point in the history
This can be handled by the `-j` flag
  • Loading branch information
upsj committed Sep 14, 2023
1 parent 4150292 commit 498123f
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions cmake/create_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,11 @@ endfunction()

function(ginkgo_add_resource_requirement test_name)
cmake_parse_arguments(PARSE_ARGV 1 add_rr "${gko_test_option_args}" "${gko_test_single_args}" "")
if(add_rr_NO_RESOURCES)
if(add_rr_NO_RESOURCES OR (NOT add_rr_RESOURCE_TYPE))
return()
endif()

if (NOT add_rr_RESOURCE_TYPE)
message(FATAL_ERROR "Need to provide resource type used by test.")
endif ()

if(add_rr_RESOURCE_TYPE STREQUAL "ref")
set(single_resource "cpu:1")
elseif(add_rr_RESOURCE_TYPE STREQUAL "cpu")
if(add_rr_RESOURCE_TYPE STREQUAL "cpu")
if(NOT add_rr_RESOURCE_LOCAL_CORES)
set(add_rr_RESOURCE_LOCAL_CORES ${GINKGO_CI_TEST_OMP_PARALLELISM})
endif()
Expand Down Expand Up @@ -79,7 +73,7 @@ endfunction()
## - `MPI_SIZE size` causes the tests to be run with `size` MPI processes.
## - `RESOURCE_LOCAL_CORES` the number of threads used by a test, default is
## $GINKGO_CI_TEST_OMP_PARALLELISM
## - `RESOURCE_TYPE` the resource type, can be ref, cpu, cudagpu, hipgpu, sycl
## - `RESOURCE_TYPE` the resource type, can be cpu, cudagpu, hipgpu, sycl
## - `DISABLE_EXECUTORS exec1 exec2` disables the test for certain backends (if built for multiple)
## - `ADDITIONAL_LIBRARIES lib1 lib2` adds additional target link dependencies
## - `ADDITIONAL_INCLUDES path1 path2` adds additional target include paths
Expand Down Expand Up @@ -121,7 +115,7 @@ function(ginkgo_create_test test_name)
add_executable(${test_target_name} ${test_name}.cpp)
target_link_libraries(${test_target_name})
ginkgo_set_test_target_properties(${test_target_name} "" ${ARGN})
ginkgo_add_test(${test_name} ${test_target_name} ${ARGN} RESOURCE_TYPE ref)
ginkgo_add_test(${test_name} ${test_target_name} ${ARGN})
endfunction(ginkgo_create_test)

## Test compiled with dpcpp
Expand Down Expand Up @@ -263,7 +257,7 @@ function(ginkgo_create_common_test_internal test_name exec_type exec)
return()
endif()
if (exec STREQUAL reference)
set(test_resource_type ref)
set(test_resource_type "")
elseif (exec STREQUAL omp)
set(test_resource_type cpu)
elseif (exec STREQUAL cuda)
Expand Down

0 comments on commit 498123f

Please sign in to comment.