1# Copyright (c) 2023 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
14# import("//build/config/features.gni")
15import("//build/test.gni")
16import("//test/xts/device_attest/build/devattestconfig.gni")
17
18##############################test_devattestclient_performance####################################
19ohos_unittest("test_devattestclient_performance") {
20  module_out_path = "devattest/devattest_performance"
21
22  include_dirs = [
23    "include",
24    "${devattest_path}/common",
25    "${devattest_path}/common/log",
26    "${devattest_innerkit_path}/native_cpp/include",
27    "//third_party/googletest/include",
28  ]
29
30  sources = [ "src/devattestclient_performance_test.cpp" ]
31
32  deps = [
33    "${devattest_path}/interfaces/innerkits/native_cpp:devattest_sdk",
34    "//third_party/googletest:gtest_main",
35  ]
36
37  external_deps = [
38    "c_utils:utils",
39    "hilog:libhilog",
40    "ipc:ipc_core",
41    "safwk:system_ability_fwk",
42    "samgr:samgr_proxy",
43  ]
44
45  subsystem_name = "xts"
46  part_name = "device_attest"
47}
48
49##############################test_devattestservice_performance####################################
50ohos_unittest("test_devattestservice_performance") {
51  module_out_path = "devattest/devattest_performance"
52
53  include_dirs = [
54    "include",
55    "${devattest_path}/services/core",
56    "${devattest_path}/common",
57    "${devattest_path}/common/log",
58    "${devattest_path}/common/permission/include",
59    "${devattest_innerkit_path}/native_cpp/include",
60    "${devattest_path}/services/devattest_ability/include",
61    "//third_party/googletest/include",
62  ]
63
64  sources = [
65    "${devattest_path}/common/permission/src/permission.cpp",
66    "${devattest_path}/services/devattest_ability/src/attest_result_info.cpp",
67    "${devattest_path}/services/devattest_ability/src/devattest_network_callback.cpp",
68    "${devattest_path}/services/devattest_ability/src/devattest_network_manager.cpp",
69    "${devattest_path}/services/devattest_ability/src/devattest_service.cpp",
70    "${devattest_path}/services/devattest_ability/src/devattest_service_stub.cpp",
71    "${devattest_path}/services/devattest_ability/src/devattest_system_ability_listener.cpp",
72    "${devattest_path}/services/devattest_ability/src/devattest_task.cpp",
73    "src/devattestservice_performance_test.cpp",
74  ]
75
76  deps = [
77    "${devattest_path}/services/core:devattest_core",
78    "//third_party/googletest:gtest_main",
79  ]
80
81  # service
82  external_deps = [
83    "c_utils:utils",
84    "eventhandler:libeventhandler",
85    "hilog:libhilog",
86    "ipc:ipc_core",
87    "safwk:system_ability_fwk",
88    "samgr:samgr_proxy",
89  ]
90
91  # for permission
92  external_deps += [
93    "access_token:libaccesstoken_sdk",
94    "access_token:libtokenid_sdk",
95  ]
96
97  # for network callback
98  external_deps += [ "netmanager_base:net_conn_manager_if" ]
99
100  subsystem_name = "xts"
101  part_name = "device_attest"
102}
103
104group("performance") {
105  testonly = true
106  deps = [
107    ":test_devattestclient_performance",
108    ":test_devattestservice_performance",
109  ]
110}
111