Skip to content

Commit 1fe0322

Browse files
authored
Merge pull request #764 from CHIP-SPV/fix-skipped-tests
Fix tests were unintentinally skipped
2 parents 6528000 + f223fcb commit 1fe0322

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

tests/runtime/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#
2424
#=============================================================================
2525

26+
set(CHIP_SKIP_TEST 77)
27+
2628
function(add_hip_runtime_test MAIN_SOURCE)
2729
get_filename_component(EXEC_NAME ${MAIN_SOURCE} NAME_WLE)
2830
set_source_files_properties(${MAIN_SOURCE} PROPERTIES LANGUAGE CXX)
@@ -35,10 +37,13 @@ function(add_hip_runtime_test MAIN_SOURCE)
3537
target_include_directories("${EXEC_NAME}"
3638
PRIVATE $<TARGET_PROPERTY:CHIP,INCLUDE_DIRECTORIES>)
3739

40+
target_compile_definitions("${EXEC_NAME}"
41+
PRIVATE CHIP_SKIP_TEST=${CHIP_SKIP_TEST})
42+
3843
add_test(NAME ${EXEC_NAME} COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${EXEC_NAME})
3944

4045
set_tests_properties("${EXEC_NAME}" PROPERTIES
41-
SKIP_REGULAR_EXPRESSION "SKIP")
46+
SKIP_RETURN_CODE ${CHIP_SKIP_TEST})
4247

4348
endfunction()
4449

tests/runtime/TestBallot.hip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ int main() {
3434
(void)hipGetDeviceProperties(&Props, 0);
3535
if (!Props.arch.hasWarpBallot) {
3636
printf("SKIP: device does not support __ballot()\n");
37-
return 2;
37+
return CHIP_SKIP_TEST;
3838
}
3939

4040
checkBallot(32, 0xBADF00D1, Props);

tests/runtime/TestIndirectMappedHostAlloc.hip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main() {
2323
HIP_CHECK(hipGetDeviceProperties(&Prop, Device));
2424
if (!Prop.canMapHostMemory) {
2525
printf("SKIP: Test requires canMapHostMemory == 1\n");
26-
return 2;
26+
return CHIP_SKIP_TEST;
2727
}
2828

2929
int *InH, *OutH;

0 commit comments

Comments
 (0)