• 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
17ohos_unittest("iam_inner_api_test") {
18  sanitize = {
19    integer_overflow = true
20    ubsan = true
21    boundary_sanitize = true
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25    blocklist = "../../../cfi_blocklist.txt"
26  }
27  branch_protector_ret = "pac_ret"
28  include_dirs = [
29    "inc",
30    "mocks",
31    "../services/mocks",
32    "../../../interfaces/inner_api",
33    "../../../frameworks/js/napi/user_auth/inc",
34    "../../../frameworks/native/client/inc",
35  ]
36
37  sources = [
38    "../../../frameworks/native/client/src/auth_message_impl.cpp",
39    "../../../frameworks/native/client/src/callback_manager_impl.cpp",
40    "../../../frameworks/native/client/src/co_auth_client_impl.cpp",
41    "../../../frameworks/native/client/src/executor_callback_service.cpp",
42    "../../../frameworks/native/client/src/executor_messenger_client.cpp",
43    "../../../frameworks/native/client/src/load_mode_client_util.cpp",
44    "../../../frameworks/native/client/src/modal_callback_service.cpp",
45    "../../../frameworks/native/client/src/user_access_ctrl_callback_service.cpp",
46    "../../../frameworks/native/client/src/user_access_ctrl_client_impl.cpp",
47    "../../../frameworks/native/client/src/user_auth_callback_service.cpp",
48    "../../../frameworks/native/client/src/user_auth_client_impl.cpp",
49    "../../../frameworks/native/client/src/user_auth_modal_inner_callback.cpp",
50    "../../../frameworks/native/client/src/user_auth_napi_client_impl.cpp",
51    "../../../frameworks/native/client/src/user_idm_callback_service.cpp",
52    "../../../frameworks/native/client/src/user_idm_client_impl.cpp",
53    "../../../frameworks/native/client/src/widget_callback_service.cpp",
54    "mocks/mock_ipc_client_utils.cpp",
55    "src/callback_manager_impl_test.cpp",
56    "src/co_auth_client_test.cpp",
57    "src/co_auth_proxy_test.cpp",
58    "src/executor_callback_proxy_test.cpp",
59    "src/executor_callback_service_test.cpp",
60    "src/executor_callback_stub_test.cpp",
61    "src/executor_messenger_client_test.cpp",
62    "src/executor_messenger_proxy_test.cpp",
63    "src/executor_messenger_stub_test.cpp",
64    "src/user_access_ctrl_client_test.cpp",
65    "src/user_auth_callback_proxy_test.cpp",
66    "src/user_auth_callback_service_test.cpp",
67    "src/user_auth_callback_stub_test.cpp",
68    "src/user_auth_client_test.cpp",
69    "src/user_auth_event_listener_stub_test.cpp",
70    "src/user_auth_napi_client_test.cpp",
71    "src/user_auth_proxy_test.cpp",
72    "src/user_idm_callback_proxy_test.cpp",
73    "src/user_idm_callback_service_test.cpp",
74    "src/user_idm_callback_stub_test.cpp",
75    "src/user_idm_client_test.cpp",
76    "src/user_idm_proxy_test.cpp",
77    "src/widget_callback_proxy_test.cpp",
78    "src/widget_callback_service_test.cpp",
79    "src/widget_callback_stub_test.cpp",
80  ]
81
82  configs = [
83    "../../../common:iam_log_config",
84    "../../../common:iam_utils_config",
85    "../../../frameworks/native/ipc:userauth_client_ipc_config",
86  ]
87  remove_configs = [ "//build/config/compiler:no_exceptions" ]
88
89  deps = [
90    "../../../frameworks/native/common:attributes",
91    "../../../frameworks/native/common:dfx",
92    "../../../frameworks/native/ipc:userauth_client_ipc",
93    "../../../frameworks/native/ipc:userauth_service_ipc",
94  ]
95
96  external_deps = [
97    "ability_runtime:ability_context_native",
98    "ability_runtime:ability_manager",
99    "ability_runtime:abilitykit_native",
100    "ability_runtime:app_context",
101    "ability_runtime:napi_base_context",
102    "ability_runtime:ui_extension",
103    "access_token:libaccesstoken_sdk",
104    "ace_engine:ace_uicontent",
105    "c_utils:utils",
106    "googletest:gmock",
107    "hilog:libhilog",
108    "init:libbeget_proxy",
109    "init:libbegetutil",
110    "ipc:ipc_single",
111    "napi:ace_napi",
112    "samgr:samgr_proxy",
113  ]
114
115  module_out_path = "useriam/user_auth_framework"
116
117  subsystem_name = "useriam"
118  part_name = "user_auth_framework"
119}
120