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")
15
16SUBSYSTEM_DIR = "//foundation/communication/ipc"
17
18# DBINDER_TEST_ROOT = "//foundation/communication/ipc/services/dbinder/test"
19MODULE_OUTPUT_PATH = "ipc/services/dbinder"
20
21ohos_moduletest("RPCCLIENTTEST") {
22  module_out_path = MODULE_OUTPUT_PATH
23  include_dirs = [
24    "include",
25    "${SUBSYSTEM_DIR}/utils/include",
26    "${SUBSYSTEM_DIR}/ipc/native/c/adapter/access_token/include",
27  ]
28  sources = [
29    "src/rpc_client_test.cpp",
30    "src/rpc_test.cpp",
31  ]
32  configs = [
33    "$SUBSYSTEM_DIR/config:dsoftbus_header_deps_config",
34    "$SUBSYSTEM_DIR/config:ipc_util_config",
35  ]
36
37  deps = [ "//third_party/googletest:gtest_main" ]
38
39  external_deps = [
40    "c_utils:utils",
41    "ipc:ipc_core",
42    "samgr:samgr_proxy",
43  ]
44}
45
46ohos_moduletest("RPCSERVERTEST") {
47  module_out_path = MODULE_OUTPUT_PATH
48  include_dirs = [
49    "include",
50    "${SUBSYSTEM_DIR}/utils/include",
51  ]
52  sources = [
53    "src/rpc_server_test.cpp",
54    "src/rpc_test.cpp",
55  ]
56  configs = [ "$SUBSYSTEM_DIR/config:ipc_util_config" ]
57  deps = [ "//third_party/googletest:gtest_main" ]
58
59  external_deps = [
60    "c_utils:utils",
61    "ipc:ipc_core",
62    "samgr:samgr_proxy",
63  ]
64}
65
66###############################################################################
67group("moduletest") {
68  testonly = true
69  deps = [
70    ":RPCCLIENTTEST",
71    ":RPCSERVERTEST",
72  ]
73}
74
75###############################################################################
76
77