1# vim: syntax=cmake 2# ---------------------------------------------------------------------------- 3# mpp/base built-in unit test case 4# ---------------------------------------------------------------------------- 5# macro for adding osal sub-module unit test 6macro(add_mpp_base_test module) 7 set(test_name ${module}_test) 8 string(TOUPPER ${test_name} test_tag) 9 #message(STATUS "moduule : ${module}") 10 #message(STATUS "test_name : ${test_name}") 11 #message(STATUS "test_tag : ${test_tag}") 12 13 option(${test_tag} "Build base ${module} unit test" ${BUILD_TEST}) 14 if(${test_tag}) 15 add_executable(${test_name} ${test_name}.c) 16 target_link_libraries(${test_name} ${MPP_SHARED}) 17 set_target_properties(${test_name} PROPERTIES FOLDER "osal/test") 18 add_test(NAME ${test_name} COMMAND ${test_name}) 19 endif() 20endmacro() 21 22# task system unit test 23add_mpp_base_test(mpp_task) 24 25# mpp_buffer unit test 26add_mpp_base_test(mpp_buffer) 27 28# mpp_packet unit test 29add_mpp_base_test(mpp_packet) 30 31# mpp_meta unit test 32add_mpp_base_test(mpp_meta) 33 34# mpp_bitwriter unit test 35add_mpp_base_test(mpp_bit) 36 37# mpp_bitread unit test 38add_mpp_base_test(mpp_bit_read) 39 40# mpp_trie unit test 41add_mpp_base_test(mpp_trie) 42 43# mpp_cluster unit test 44add_mpp_base_test(mpp_cluster) 45 46# mpp_enc_cfg unit test 47add_mpp_base_test(mpp_enc_cfg) 48 49# mpp_enc_ref unit test 50add_mpp_base_test(mpp_enc_ref) 51 52# mpp_dec_cfg unit test 53add_mpp_base_test(mpp_dec_cfg) 54 55# mpp_sys_cfg unit test 56add_mpp_base_test(mpp_sys_cfg) 57 58# mpp_sys_cfgi unit test 59add_mpp_base_test(mpp_sys_cfg_st) 60 61# mpp_cfg_io unit test 62add_mpp_base_test(mpp_cfg) 63