• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022-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
14import("//build/ohos.gni")
15import("//build/test.gni")
16
17module_output_path = "pin_auth/PinAuth_UT_test"
18
19ohos_unittest("PinAuth_UT_test") {
20  module_out_path = module_output_path
21
22  sources = [
23    "src/inputer_data_impl_test.cpp",
24    "src/inputer_get_data_proxy_test.cpp",
25    "src/inputer_get_data_service_test.cpp",
26    "src/inputer_get_data_stub_test.cpp",
27    "src/inputer_set_data_proxy_test.cpp",
28    "src/inputer_set_data_stub_test.cpp",
29    "src/pin_auth_driver_hdi_unit_test.cpp",
30    "src/pin_auth_executor_callback_hdi_unit_test.cpp",
31    "src/pin_auth_executor_hdi_unit_test.cpp",
32    "src/pin_auth_proxy_test.cpp",
33    "src/pin_auth_register_test.cpp",
34    "src/pin_auth_service_test.cpp",
35    "src/pin_auth_stub_test.cpp",
36  ]
37
38  include_dirs = [
39    "inc",
40    "mocks",
41  ]
42
43  deps = [
44    "../../frameworks:pinauth_framework_source_set",
45    "../../frameworks:pinauth_ipc",
46    "../../services:pinauthservice_source_set",
47    "//third_party/googletest:gmock",
48    "//third_party/openssl:libcrypto_shared",
49  ]
50
51  external_deps = [
52    "access_token:libaccesstoken_sdk",
53    "access_token:libnativetoken",
54    "access_token:libtoken_setproc",
55    "c_utils:utils",
56    "drivers_interface_pin_auth:libpin_auth_proxy_1.1",
57    "hilog:libhilog",
58    "hisysevent:libhisysevent",
59    "ipc:ipc_single",
60    "safwk:system_ability_fwk",
61    "samgr:samgr_proxy",
62    "user_auth_framework:userauth_client",
63    "user_auth_framework:userauth_executors",
64  ]
65
66  remove_configs = [ "//build/config/compiler:no_exceptions" ]
67
68  configs = [
69    "../../frameworks:pinauth_config",
70    "../../common:iam_log_config",
71    "../../frameworks/:pinauth_ipc_config",
72    "../../common:iam_utils_config",
73  ]
74
75  subsystem_name = "useriam"
76  part_name = "pin_auth"
77}
78
79ohos_unittest("PinAuth_Service_test") {
80  module_out_path = module_output_path
81
82  sources = [ "src/pinauth_test.cpp" ]
83
84  include_dirs = [
85    "inc",
86    "../../interfaces/inner_api",
87  ]
88
89  deps = [ "../../services:pinauthservice" ]
90
91  external_deps = [
92    "c_utils:utils",
93    "hilog:libhilog",
94    "ipc:ipc_single",
95    "pin_auth:pinauth_framework",
96    "safwk:system_ability_fwk",
97  ]
98
99  remove_configs = [ "//build/config/compiler:no_exceptions" ]
100
101  configs = [
102    "../../common:iam_log_config",
103    "../../frameworks/:pinauth_ipc_config",
104    "../../common:iam_utils_config",
105  ]
106
107  subsystem_name = "useriam"
108  part_name = "pin_auth"
109}
110