Skip to content
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
7 changes: 6 additions & 1 deletion tests/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#
#=============================================================================

set(CHIP_SKIP_TEST 77)

function(add_hip_runtime_test MAIN_SOURCE)
get_filename_component(EXEC_NAME ${MAIN_SOURCE} NAME_WLE)
set_source_files_properties(${MAIN_SOURCE} PROPERTIES LANGUAGE CXX)
Expand All @@ -35,10 +37,13 @@ function(add_hip_runtime_test MAIN_SOURCE)
target_include_directories("${EXEC_NAME}"
PRIVATE $<TARGET_PROPERTY:CHIP,INCLUDE_DIRECTORIES>)

target_compile_definitions("${EXEC_NAME}"
PRIVATE CHIP_SKIP_TEST=${CHIP_SKIP_TEST})

add_test(NAME ${EXEC_NAME} COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${EXEC_NAME})

set_tests_properties("${EXEC_NAME}" PROPERTIES
SKIP_REGULAR_EXPRESSION "SKIP")
SKIP_RETURN_CODE ${CHIP_SKIP_TEST})

endfunction()

Expand Down
2 changes: 1 addition & 1 deletion tests/runtime/TestBallot.hip
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int main() {
(void)hipGetDeviceProperties(&Props, 0);
if (!Props.arch.hasWarpBallot) {
printf("SKIP: device does not support __ballot()\n");
return 2;
return CHIP_SKIP_TEST;
}

checkBallot(32, 0xBADF00D1, Props);
Expand Down
2 changes: 1 addition & 1 deletion tests/runtime/TestIndirectMappedHostAlloc.hip
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int main() {
HIP_CHECK(hipGetDeviceProperties(&Prop, Device));
if (!Prop.canMapHostMemory) {
printf("SKIP: Test requires canMapHostMemory == 1\n");
return 2;
return CHIP_SKIP_TEST;
}

int *InH, *OutH;
Expand Down