# Copyright (C) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("../../../callmanager.gni") CALL_MANAGER_PATH = "../../.." ohos_unittest("tel_call_manager_zero1_gtest") { install_enable = true subsystem_name = "telephony" part_name = "call_manager" test_module = "tel_call_manager_zero_gtest" module_out_path = part_name + "/" + test_module sanitize = { cfi = true cfi_cross_dso = true debug = false blocklist = "../../cfi_blocklist.txt" } branch_protector_ret = "pac_ret" sources = [ "${CALL_MANAGER_PATH}/frameworks/native/src/call_manager_service_proxy.cpp", "src/zero_branch1_test.cpp", "src/zero_branch_test_call_state.cpp", ] sources += call_manager_sources include_dirs = [ "${CALL_MANAGER_PATH}/interfaces/innerkits" ] include_dirs += call_manager_include_dirs external_deps = [ "access_token:libnativetoken", "access_token:libtoken_setproc", ] external_deps += call_manager_external_deps deps = [ "${CALL_MANAGER_PATH}/frameworks/native:tel_call_manager_api", "//third_party/cJSON:cjson", "//third_party/libphonenumber/cpp:phonenumber_standard", ] defines = [ "TELEPHONY_LOG_TAG = \"CallManagerGtest\"", "LOG_DOMAIN = 0xD000F00", ] defines += call_manager_defines } ohos_unittest("tel_call_manager_zero2_gtest") { install_enable = true subsystem_name = "telephony" part_name = "call_manager" test_module = "tel_call_manager_zero_gtest" module_out_path = part_name + "/" + test_module sanitize = { cfi = true cfi_cross_dso = true debug = false blocklist = "../../cfi_blocklist.txt" } branch_protector_ret = "pac_ret" sources = [ "${CALL_MANAGER_PATH}/frameworks/native/src/call_manager_service_proxy.cpp", "src/zero_branch2_test.cpp", ] sources += call_manager_sources include_dirs = [ "${CALL_MANAGER_PATH}/interfaces/innerkits" ] include_dirs += call_manager_include_dirs external_deps = [ "access_token:libnativetoken", "access_token:libtoken_setproc", ] external_deps += call_manager_external_deps deps = [ "${CALL_MANAGER_PATH}/frameworks/native:tel_call_manager_api", "//third_party/cJSON:cjson", "//third_party/libphonenumber/cpp:phonenumber_standard", ] defines = [ "TELEPHONY_LOG_TAG = \"CallManagerGtest\"", "LOG_DOMAIN = 0xD000F00", ] defines += call_manager_defines } ohos_unittest("tel_call_manager_zero3_gtest") { install_enable = true subsystem_name = "telephony" part_name = "call_manager" test_module = "tel_call_manager_zero_gtest" module_out_path = part_name + "/" + test_module sanitize = { cfi = true cfi_cross_dso = true debug = false blocklist = "../../cfi_blocklist.txt" } branch_protector_ret = "pac_ret" sources = [ "${CALL_MANAGER_PATH}/frameworks/native/src/call_manager_service_proxy.cpp", "src/zero_branch3_test.cpp", ] sources += call_manager_sources include_dirs = [ "${CALL_MANAGER_PATH}/interfaces/innerkits" ] include_dirs += call_manager_include_dirs external_deps = [ "access_token:libnativetoken", "access_token:libtoken_setproc", ] external_deps += call_manager_external_deps deps = [ "${CALL_MANAGER_PATH}/frameworks/native:tel_call_manager_api", "//third_party/cJSON:cjson", "//third_party/libphonenumber/cpp:phonenumber_standard", ] defines = [ "TELEPHONY_LOG_TAG = \"CallManagerGtest\"", "LOG_DOMAIN = 0xD000F00", ] defines += call_manager_defines } ohos_unittest("tel_call_manager_zero4_gtest") { install_enable = true subsystem_name = "telephony" part_name = "call_manager" test_module = "tel_call_manager_zero_gtest" module_out_path = part_name + "/" + test_module sanitize = { cfi = true cfi_cross_dso = true debug = false blocklist = "../../cfi_blocklist.txt" } branch_protector_ret = "pac_ret" sources = [ "${CALL_MANAGER_PATH}/frameworks/native/src/call_manager_service_proxy.cpp", "src/zero_branch4_test.cpp", ] sources += call_manager_sources include_dirs = [ "${CALL_MANAGER_PATH}/interfaces/innerkits" ] include_dirs += call_manager_include_dirs external_deps = [ "access_token:libnativetoken", "access_token:libtoken_setproc", ] external_deps += call_manager_external_deps deps = [ "${CALL_MANAGER_PATH}/frameworks/native:tel_call_manager_api", "//third_party/cJSON:cjson", "//third_party/libphonenumber/cpp:phonenumber_standard", ] defines = [ "TELEPHONY_LOG_TAG = \"CallManagerGtest\"", "LOG_DOMAIN = 0xD000F00", ] defines += call_manager_defines } ohos_unittest("tel_call_manager_zero5_gtest") { install_enable = true subsystem_name = "telephony" part_name = "call_manager" test_module = "tel_call_manager_zero_gtest" module_out_path = part_name + "/" + test_module sanitize = { cfi = true cfi_cross_dso = true debug = false blocklist = "../../cfi_blocklist.txt" } branch_protector_ret = "pac_ret" sources = [ "${CALL_MANAGER_PATH}/frameworks/native/src/call_manager_service_proxy.cpp", "src/zero_branch5_test.cpp", ] sources += call_manager_sources include_dirs = [ "${CALL_MANAGER_PATH}/interfaces/innerkits" ] include_dirs += call_manager_include_dirs external_deps = [ "access_token:libnativetoken", "access_token:libtoken_setproc", ] external_deps += call_manager_external_deps deps = [ "${CALL_MANAGER_PATH}/frameworks/native:tel_call_manager_api", "//third_party/cJSON:cjson", "//third_party/libphonenumber/cpp:phonenumber_standard", ] defines = [ "TELEPHONY_LOG_TAG = \"CallManagerGtest\"", "LOG_DOMAIN = 0xD000F00", ] defines += call_manager_defines } ohos_unittest("tel_call_manager_zero6_gtest") { install_enable = true subsystem_name = "telephony" part_name = "call_manager" test_module = "tel_call_manager_zero_gtest" module_out_path = part_name + "/" + test_module sanitize = { cfi = true cfi_cross_dso = true debug = false blocklist = "../../cfi_blocklist.txt" } branch_protector_ret = "pac_ret" sources = [ "${CALL_MANAGER_PATH}/frameworks/native/src/call_manager_service_proxy.cpp", "src/zero_branch6_test.cpp", ] sources += call_manager_sources include_dirs = [ "${CALL_MANAGER_PATH}/interfaces/innerkits" ] include_dirs += call_manager_include_dirs external_deps = [ "access_token:libnativetoken", "access_token:libtoken_setproc", ] external_deps += call_manager_external_deps deps = [ "${CALL_MANAGER_PATH}/frameworks/native:tel_call_manager_api", "//third_party/cJSON:cjson", "//third_party/libphonenumber/cpp:phonenumber_standard", ] defines = [ "TELEPHONY_LOG_TAG = \"CallManagerGtest\"", "LOG_DOMAIN = 0xD000F00", ] defines += call_manager_defines if (device_name == "rk3568") { defines += [ "CALL_MANAGER_AUTO_START_OPTIMIZE" ] } }