mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-24 09:33:07 +08:00
Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com> Change-Id: If4cc861cd1598e0b66842f8f21256a1a0000b4a6
33 lines
1.1 KiB
CMake
33 lines
1.1 KiB
CMake
# vim: syntax=cmake
|
|
# ----------------------------------------------------------------------------
|
|
# kmpp/base built-in unit test case
|
|
# ----------------------------------------------------------------------------
|
|
# macro for adding osal sub-module unit test
|
|
macro(add_kmpp_base_test module)
|
|
set(test_name ${module}_test)
|
|
string(TOUPPER ${test_name} test_tag)
|
|
#message(STATUS "moduule : ${module}")
|
|
#message(STATUS "test_name : ${test_name}")
|
|
#message(STATUS "test_tag : ${test_tag}")
|
|
|
|
option(${test_tag} "Build base ${module} unit test" ${BUILD_TEST})
|
|
if(${test_tag})
|
|
add_executable(${test_name} ${test_name}.c)
|
|
target_link_libraries(${test_name} ${MPP_SHARED})
|
|
set_target_properties(${test_name} PROPERTIES FOLDER "osal/test")
|
|
add_test(NAME ${test_name} COMMAND ${test_name})
|
|
endif()
|
|
endmacro()
|
|
|
|
# kmpp object unit test
|
|
add_kmpp_base_test(kmpp_obj)
|
|
|
|
# kmpp frame unit test
|
|
add_kmpp_base_test(kmpp_frame)
|
|
|
|
# kmpp buffer unit test
|
|
add_kmpp_base_test(kmpp_buffer)
|
|
|
|
# kmpp meta unit test
|
|
add_kmpp_base_test(kmpp_meta)
|