1e1c44949Sopenharmony_ci# Copyright (C) 2024-2024 Huawei Device Co., Ltd.
2e1c44949Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3e1c44949Sopenharmony_ci# you may not use this file except in compliance with the License.
4e1c44949Sopenharmony_ci# You may obtain a copy of the License at
5e1c44949Sopenharmony_ci#
6e1c44949Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7e1c44949Sopenharmony_ci#
8e1c44949Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9e1c44949Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10e1c44949Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11e1c44949Sopenharmony_ci# See the License for the specific language governing permissions and
12e1c44949Sopenharmony_ci# limitations under the License.
13e1c44949Sopenharmony_ci
14e1c44949Sopenharmony_ciimport("//build/test.gni")
15e1c44949Sopenharmony_ciimport("../../../callmanager.gni")
16e1c44949Sopenharmony_ciCALL_MANAGER_PATH = "../../.."
17e1c44949Sopenharmony_ci
18e1c44949Sopenharmony_ciohos_unittest("distributed_communication_test") {
19e1c44949Sopenharmony_ci  install_enable = true
20e1c44949Sopenharmony_ci  subsystem_name = "telephony"
21e1c44949Sopenharmony_ci  part_name = "call_manager"
22e1c44949Sopenharmony_ci  test_module = "distributed_communication_test"
23e1c44949Sopenharmony_ci  module_out_path = part_name + "/" + test_module
24e1c44949Sopenharmony_ci  sanitize = {
25e1c44949Sopenharmony_ci    cfi = true
26e1c44949Sopenharmony_ci    cfi_cross_dso = true
27e1c44949Sopenharmony_ci    debug = false
28e1c44949Sopenharmony_ci    blocklist = "../../cfi_blocklist.txt"
29e1c44949Sopenharmony_ci  }
30e1c44949Sopenharmony_ci  branch_protector_ret = "pac_ret"
31e1c44949Sopenharmony_ci
32e1c44949Sopenharmony_ci  sources = [
33e1c44949Sopenharmony_ci    "src/distributed_communication_manager_test.cpp",
34e1c44949Sopenharmony_ci    "src/distributed_data_test.cpp",
35e1c44949Sopenharmony_ci    "src/distributed_dev_observer_test.cpp",
36e1c44949Sopenharmony_ci    "src/distributed_dev_switch_test.cpp",
37e1c44949Sopenharmony_ci    "src/distributed_transmission_test.cpp",
38e1c44949Sopenharmony_ci  ]
39e1c44949Sopenharmony_ci  sources += call_manager_sources
40e1c44949Sopenharmony_ci
41e1c44949Sopenharmony_ci  include_dirs = []
42e1c44949Sopenharmony_ci  include_dirs += call_manager_include_dirs
43e1c44949Sopenharmony_ci
44e1c44949Sopenharmony_ci  external_deps = []
45e1c44949Sopenharmony_ci  external_deps += call_manager_external_deps
46e1c44949Sopenharmony_ci
47e1c44949Sopenharmony_ci  remove_configs = [ "//build/config/compiler:no_exceptions" ]
48e1c44949Sopenharmony_ci
49e1c44949Sopenharmony_ci  deps = [
50e1c44949Sopenharmony_ci    "${CALL_MANAGER_PATH}/frameworks/native:tel_call_manager_api",
51e1c44949Sopenharmony_ci    "//third_party/cJSON:cjson",
52e1c44949Sopenharmony_ci    "//third_party/libphonenumber/cpp:phonenumber_standard",
53e1c44949Sopenharmony_ci  ]
54e1c44949Sopenharmony_ci
55e1c44949Sopenharmony_ci  defines = [
56e1c44949Sopenharmony_ci    "TELEPHONY_LOG_TAG = \"CallManagerGtest\"",
57e1c44949Sopenharmony_ci    "LOG_DOMAIN = 0xD000F00",
58e1c44949Sopenharmony_ci    "private = public",
59e1c44949Sopenharmony_ci    "protected = public",
60e1c44949Sopenharmony_ci  ]
61e1c44949Sopenharmony_ci}
62