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

Split group_scan and group_reduce tests by data types #815

Merged
merged 12 commits into from
Nov 21, 2023
44 changes: 22 additions & 22 deletions tests/group_functions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
function(configure_test_case)
cmake_parse_arguments(CTS
"" "TYPE;IN_FILENAME;OUT_FILENAME;TEST_LIST" "" ${ARGN})
set(CTS_TYPE_NAME ${CTS_TYPE})
configure_file(${CTS_IN_FILENAME} ${CTS_OUT_FILENAME})
list(APPEND ${CTS_TEST_LIST} "${CMAKE_CURRENT_BINARY_DIR}/${CTS_OUT_FILENAME}")
set(${CTS_TEST_LIST} ${${CTS_TEST_LIST}} PARENT_SCOPE)
function(configure_test_case)
bader marked this conversation as resolved.
Show resolved Hide resolved
cmake_parse_arguments(CTS
"" "TYPE;IN_FILENAME;OUT_FILENAME;TEST_LIST" "" ${ARGN})
set(CTS_TYPE_NAME ${CTS_TYPE})
configure_file(${CTS_IN_FILENAME} ${CTS_OUT_FILENAME})
list(APPEND ${CTS_TEST_LIST} "${CMAKE_CURRENT_BINARY_DIR}/${CTS_OUT_FILENAME}")
set(${CTS_TEST_LIST} ${${CTS_TEST_LIST}} PARENT_SCOPE)
endfunction()

list(APPEND TEMPLATE_LIST
"group_joint_scan"
"group_scan_over_group"
"group_joint_reduce"
"group_reduce_over_group"
"group_joint_scan"
"group_scan_over_group"
"group_joint_reduce"
"group_reduce_over_group"
)
set(TYPE_LIST "")
get_std_type(TYPE_LIST)
Expand All @@ -20,17 +20,17 @@ file(GLOB test_cases_list *.cpp)

foreach(TEMP IN LISTS TEMPLATE_LIST)
foreach(TY IN LISTS TYPE_LIST)
if(TY STREQUAL "bool")
continue()
endif()
set(OUT_FILE "${TEMP}_${TY}.cpp")
STRING(REGEX REPLACE ":" "_" OUT_FILE ${OUT_FILE})
STRING(REGEX REPLACE " " "_" OUT_FILE ${OUT_FILE})
configure_test_case(
TYPE "${TY}"
IN_FILENAME "${TEMP}.cpp.in"
OUT_FILENAME ${OUT_FILE}
TEST_LIST test_cases_list)
if(TY STREQUAL "bool")
continue()
endif()
set(OUT_FILE "${TEMP}_${TY}.cpp")
STRING(REGEX REPLACE ":" "_" OUT_FILE ${OUT_FILE})
STRING(REGEX REPLACE " " "_" OUT_FILE ${OUT_FILE})
configure_test_case(
TYPE "${TY}"
IN_FILENAME "${TEMP}.cpp.in"
OUT_FILENAME ${OUT_FILE}
EST_LIST test_cases_list)
jiezzhang marked this conversation as resolved.
Show resolved Hide resolved
endforeach()
endforeach()

Expand Down