• 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
29  cflags = [
30    "-DIAM_TEST_ENABLE",
31    "-Dprivate=public",
32    "-Dprotected=public",
33  ]
34  include_dirs = [
35    "inc",
36    "mocks",
37    "../services/mocks",
38    "../../../interfaces/inner_api",
39    "../../../frameworks/common/inc",
40    "../../../frameworks/native/client/inc",
41  ]
42
43  sources = [
44    "../../../frameworks/native/client/src/auth_message_impl.cpp",
45    "../../../frameworks/native/client/src/callback_manager_impl.cpp",
46    "../../../frameworks/native/client/src/co_auth_client_impl.cpp",
47    "../../../frameworks/native/client/src/event_listener_callback_service.cpp",
48    "../../../frameworks/native/client/src/executor_callback_service.cpp",
49    "../../../frameworks/native/client/src/executor_messenger_client.cpp",
50    "../../../frameworks/native/client/src/load_mode_client_util.cpp",
51    "../../../frameworks/native/client/src/modal_callback_service.cpp",
52    "../../../frameworks/native/client/src/user_access_ctrl_callback_service.cpp",
53    "../../../frameworks/native/client/src/user_access_ctrl_client_impl.cpp",
54    "../../../frameworks/native/client/src/user_auth_callback_service.cpp",
55    "../../../frameworks/native/client/src/user_auth_client_impl.cpp",
56    "../../../frameworks/native/client/src/user_auth_modal_inner_callback.cpp",
57    "../../../frameworks/native/client/src/user_auth_napi_client_impl.cpp",
58    "../../../frameworks/native/client/src/user_idm_callback_service.cpp",
59    "../../../frameworks/native/client/src/user_idm_client_impl.cpp",
60    "../../../frameworks/native/client/src/widget_callback_service.cpp",
61    "mocks/mock_ipc_client_utils.cpp",
62    "src/callback_manager_impl_test.cpp",
63    "src/co_auth_client_test.cpp",
64    "src/executor_callback_service_test.cpp",
65    "src/executor_messenger_client_test.cpp",
66    "src/user_access_ctrl_client_test.cpp",
67    "src/user_auth_callback_service_test.cpp",
68    "src/user_auth_client_test.cpp",
69    "src/user_auth_napi_client_test.cpp",
70    "src/user_idm_callback_service_test.cpp",
71    "src/user_idm_client_test.cpp",
72    "src/widget_callback_service_test.cpp",
73    "src/event_listener_callback_service_test.cpp"
74  ]
75
76  configs = [
77    "../../../common:iam_log_config",
78    "../../../common:iam_utils_config",
79    "../../../frameworks/native/ipc:userauth_client_ipc_config",
80  ]
81  remove_configs = [ "//build/config/compiler:no_exceptions" ]
82
83  deps = [
84    "../../../frameworks/native/common:attributes",
85    "../../../frameworks/native/common:dfx",
86    "../../../frameworks/native/ipc:iam_inner_api",
87  ]
88
89  external_deps = [
90    "ability_runtime:ability_context_native",
91    "ability_runtime:ability_manager",
92    "ability_runtime:abilitykit_native",
93    "ability_runtime:app_context",
94    "ability_runtime:napi_base_context",
95    "ability_runtime:ui_extension",
96    "access_token:libaccesstoken_sdk",
97    "ace_engine:ace_uicontent",
98    "c_utils:utils",
99    "googletest:gmock",
100    "hilog:libhilog",
101    "init:libbeget_proxy",
102    "init:libbegetutil",
103    "ipc:ipc_single",
104    "napi:ace_napi",
105    "samgr:samgr_proxy",
106  ]
107
108  module_out_path = "user_auth_framework/user_auth_framework"
109
110  subsystem_name = "useriam"
111  part_name = "user_auth_framework"
112}
113