From 3d76d003e2a913c0daf213bba2bc031b8cef9620 Mon Sep 17 00:00:00 2001 From: wuhuanzhou Date: Tue, 31 Aug 2021 15:46:24 +0800 Subject: [PATCH] fix CI skip cc test error (#35264) * fix CI skip cc test error, test=develop * remove test code, test=develop --- cmake/generic.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/generic.cmake b/cmake/generic.cmake index f3d10b57d9f..197d12e7ad8 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -431,6 +431,8 @@ function(cc_test_run TARGET_NAME) if (APPLE) set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 20) endif() + elseif(WITH_TESTING AND NOT TEST ${TARGET_NAME}) + add_test(NAME ${TARGET_NAME} COMMAND ${CMAKE_COMMAND} -E echo CI skip ${TARGET_NAME}.) endif() endfunction() @@ -459,6 +461,8 @@ function(cc_test TARGET_NAME) COMMAND ${TARGET_NAME} ARGS ${cc_test_ARGS}) endif() + elseif(WITH_TESTING AND NOT TEST ${TARGET_NAME}) + add_test(NAME ${TARGET_NAME} COMMAND ${CMAKE_COMMAND} -E echo CI skip ${TARGET_NAME}.) endif() endfunction(cc_test) -- GitLab