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_services_test") { 18 include_dirs = [ 19 "inc", 20 "mocks", 21 "../../../services/base/inc", 22 "../../../services/core/inc", 23 "../../../services/core/src", 24 "../../../services/context/inc", 25 "../../../services/context/src", 26 "../../../services/ipc/inc", 27 "../../../frameworks/js/napi/user_auth/inc", 28 "../../../frameworks/native/ipc/inc", 29 "../../../frameworks/native/ipc/common_defines", 30 ] 31 32 sources = [ 33 "../../../services/base/src/finite_state_machine_builder.cpp", 34 "../../../services/base/src/finite_state_machine_impl.cpp", 35 "../../../services/base/src/relative_timer.cpp", 36 "../../../services/base/src/thread_handler_impl.cpp", 37 "../../../services/context/src/base_context.cpp", 38 "../../../services/context/src/context_callback_impl.cpp", 39 "../../../services/context/src/context_factory.cpp", 40 "../../../services/context/src/context_helper.cpp", 41 "../../../services/context/src/context_pool_impl.cpp", 42 "../../../services/context/src/enroll_context.cpp", 43 "../../../services/context/src/identify_context.cpp", 44 "../../../services/context/src/simple_auth_context.cpp", 45 "../../../services/context/src/trace.cpp", 46 "../../../services/context/src/ui_extension_ability_connection.cpp", 47 "../../../services/context/src/widget_client.cpp", 48 "../../../services/context/src/widget_context.cpp", 49 "../../../services/context/src/widget_context_callback_impl.cpp", 50 "../../../services/context/src/widget_json.cpp", 51 "../../../services/core/src/auth_widget_helper.cpp", 52 "../../../services/core/src/authentication_impl.cpp", 53 "../../../services/core/src/credential_info_impl.cpp", 54 "../../../services/core/src/enrolled_info_impl.cpp", 55 "../../../services/core/src/enrollment_impl.cpp", 56 "../../../services/core/src/identification_impl.cpp", 57 "../../../services/core/src/resource_node_impl.cpp", 58 "../../../services/core/src/resource_node_pool_impl.cpp", 59 "../../../services/core/src/resource_node_utils.cpp", 60 "../../../services/core/src/schedule_node_builder.cpp", 61 "../../../services/core/src/schedule_node_helper.cpp", 62 "../../../services/core/src/schedule_node_impl.cpp", 63 "../../../services/core/src/secure_user_info_impl.cpp", 64 "../../../services/core/src/template_cache_manager.cpp", 65 "../../../services/core/src/user_idm_database_impl.cpp", 66 "../../../services/core/src/user_idm_session_controller_impl.cpp", 67 "../../../services/core/src/widget_schedule_node_impl.cpp", 68 "../../../services/ipc/src/co_auth_service.cpp", 69 "../../../services/ipc/src/executor_messenger_service.cpp", 70 "../../../services/ipc/src/user_auth_service.cpp", 71 "../../../services/ipc/src/user_idm_service.cpp", 72 "mocks/mock_ipc_common.cpp", 73 "mocks/mock_iuser_auth_interface.cpp", 74 "src/attributes_test.cpp", 75 "src/auth_widget_helper_test.cpp", 76 "src/authentication_impl_test.cpp", 77 "src/co_auth_service_test.cpp", 78 "src/co_auth_stub_test.cpp", 79 "src/context_callback_impl_test.cpp", 80 "src/context_factory_test.cpp", 81 "src/context_pool_test.cpp", 82 "src/credential_info_test.cpp", 83 "src/enroll_context_test.cpp", 84 "src/enrolled_info_test.cpp", 85 "src/enrollment_impl_test.cpp", 86 "src/executor_messenger_service_test.cpp", 87 "src/identification_impl_test.cpp", 88 "src/identify_context_test.cpp", 89 "src/ipc_common_test.cpp", 90 "src/relative_timer_test.cpp", 91 "src/resource_node_pool_test.cpp", 92 "src/resource_node_test.cpp", 93 "src/resource_node_utils_test.cpp", 94 "src/schedule_node_helper_test.cpp", 95 "src/schedule_node_test.cpp", 96 "src/secure_user_info_test.cpp", 97 "src/simple_auth_context_test.cpp", 98 "src/state_machine_test.cpp", 99 "src/ui_extension_ability_connection_test.cpp", 100 "src/user_auth_service_test.cpp", 101 "src/user_auth_stub_test.cpp", 102 "src/user_idm_database_test.cpp", 103 "src/user_idm_service_test.cpp", 104 "src/user_idm_session_controller_test.cpp", 105 "src/user_idm_stub_test.cpp", 106 "src/widget_client_test.cpp", 107 "src/widget_context_callback_impl_test.cpp", 108 "src/widget_context_test.cpp", 109 "src/widget_json_test.cpp", 110 "src/widget_schedule_node_impl_test.cpp", 111 ] 112 113 deps = [ 114 "../../../common:iam_utils", 115 "../../../frameworks/native/common:attributes", 116 "../../../frameworks/native/common:dfx", 117 "../../../frameworks/native/ipc:userauth_service_ipc", 118 "//third_party/googletest:gmock", 119 "//third_party/openssl:libcrypto_shared", 120 ] 121 122 external_deps = [ 123 "ability_base:base", 124 "ability_base:want", 125 "ability_base:zuri", 126 "ability_runtime:ability_context_native", 127 "ability_runtime:abilitykit_native", 128 "ability_runtime:extension_manager", 129 "access_token:libaccesstoken_sdk", 130 "access_token:libtokenid_sdk", 131 "c_utils:utils", 132 "drivers_interface_user_auth:libuser_auth_proxy_1.1", 133 "hilog:libhilog", 134 "hitrace:hitrace_meter", 135 "init:libbegetutil", 136 "ipc:ipc_single", 137 "napi:ace_napi", 138 "os_account:os_account_innerkits", 139 "safwk:system_ability_fwk", 140 "samgr:samgr_proxy", 141 ] 142 143 configs = [ 144 "../../../common:iam_log_config", 145 "../../../common:iam_utils_config", 146 ] 147 148 remove_configs = [ "//build/config/compiler:no_exceptions" ] 149 150 module_out_path = "useriam/user_auth_framework" 151 152 subsystem_name = "useriam" 153 part_name = "user_auth_framework" 154} 155