• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/test.gni")
15import("../../../config.gni")
16
17MODULE_OUTPUT_PATH = "ipc/ipc"
18
19ohos_unittest("RPCDbinderTest") {
20  module_out_path = MODULE_OUTPUT_PATH
21
22  include_dirs = [
23    "$IPC_ROOT_PATH/ipc/native/src/core/invoker/include",
24    "$IPC_ROOT_PATH/ipc/native/src/core/framework/include",
25    "$IPC_ROOT_PATH/ipc/native/c/manager/include",
26    "$IPC_ROOT_PATH/utils/include",
27    "$IPC_ROOT_PATH/interfaces/innerkits/ipc_core/include",
28    "$IPC_ROOT_PATH/ipc/native/c/rpc/include",
29  ]
30
31  sources = [
32    "$IPC_ROOT_PATH/ipc/native/src/core/invoker/source/hitrace_invoker.cpp",
33    "dbinder_base_invoker_unittest.cpp",
34    "dbinder_death_recipient_unittest.cpp",
35    "dbinder_remote_listener_unittest.cpp",
36    "dbinder_service_stub_unittest.cpp",
37  ]
38
39  configs = [ "$IPC_ROOT_PATH/config:dsoftbus_header_deps_config" ]
40
41  deps = [
42    "$IPC_ROOT_PATH/interfaces/innerkits/ipc_single:ipc_single_test",
43    "$IPC_ROOT_PATH/ipc/native/src/core:ipc_common",
44  ]
45
46  external_deps = [
47    "c_utils:utils",
48    "googletest:gmock",
49    "hilog:libhilog",
50    "hitrace:libhitracechain",
51    "ipc:libdbinder",
52  ]
53
54  if (hiviewdfx_hisysevent_support) {
55    external_deps += [ "hisysevent:libhisysevent" ]
56  }
57
58  resource_config_file = "$IPC_ROOT_PATH/test/resource/ipc/ohos_test.xml"
59}
60
61ohos_unittest("RPCDbinderServiceTest") {
62  module_out_path = MODULE_OUTPUT_PATH
63
64  include_dirs = [
65    "$IPC_ROOT_PATH/ipc/native/c/manager/include",
66    "$IPC_ROOT_PATH/utils/include",
67    "$IPC_ROOT_PATH/interfaces/innerkits/ipc_core/include",
68    "$IPC_ROOT_PATH/ipc/native/c/rpc/include",
69  ]
70
71  sources = [ "dbinder_service_unittest.cpp" ]
72
73  configs = [ "$IPC_ROOT_PATH/config:dsoftbus_header_deps_config" ]
74
75  deps = [ "$IPC_ROOT_PATH/interfaces/innerkits/ipc_single:ipc_single_test" ]
76
77  external_deps = [
78    "c_utils:utils",
79    "googletest:gmock",
80    "hilog:libhilog",
81    "ipc:libdbinder",
82  ]
83
84  resource_config_file = "$IPC_ROOT_PATH/test/resource/ipc/ohos_test.xml"
85}
86
87###############################################################################
88group("unittest") {
89  testonly = true
90  deps = [
91    ":RPCDbinderServiceTest",
92    ":RPCDbinderTest",
93    "../auxiliary:Dynamic_loading_softbus_client_test",
94  ]
95}
96