1# Copyright (C) 2022 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 "//base/useriam/pin_auth/interfaces/inner_api", 42 "//base/useriam/pin_auth/services/sa/inc", 43 "//base/useriam/pin_auth/services/modules/driver/inc", 44 "//base/useriam/pin_auth/services/modules/executors/inc", 45 "//base/useriam/pin_auth/services/modules/inputters/inc", 46 "//base/useriam/user_auth_framework/common/logs", 47 "//base/useriam/user_auth_framework/common/utils", 48 "//base/useriam/user_auth_framework/common/executors/include/public", 49 "//base/useriam/user_auth_framework/interfaces/inner_api", 50 ] 51 52 deps = [ 53 "//base/useriam/pin_auth/frameworks:pinauth_framework", 54 "//base/useriam/pin_auth/services:pinauthservice", 55 "//third_party/googletest:gmock", 56 ] 57 58 external_deps = [ 59 "access_token:libaccesstoken_sdk", 60 "access_token:libnativetoken", 61 "access_token:libtoken_setproc", 62 "c_utils:utils", 63 "drivers_interface_pin_auth:libpin_auth_proxy_1.0", 64 "hiviewdfx_hilog_native:libhilog", 65 "ipc:ipc_core", 66 "safwk:system_ability_fwk", 67 ] 68 69 remove_configs = [ "//build/config/compiler:no_exceptions" ] 70 71 configs = [ 72 "//base/useriam/pin_auth/services:pin_auth_services_config", 73 "//base/useriam/user_auth_framework/common:iam_log_config", 74 "//base/useriam/pin_auth/frameworks/:pinauth_ipc_config", 75 "//base/useriam/user_auth_framework/common:iam_utils_config", 76 ] 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 "//base/useriam/pin_auth/interfaces/inner_api", 87 ] 88 89 deps = [ 90 "//base/useriam/pin_auth/frameworks:pinauth_framework", 91 "//base/useriam/pin_auth/services:pinauthservice", 92 ] 93 94 external_deps = [ 95 "c_utils:utils", 96 "hiviewdfx_hilog_native:libhilog", 97 "ipc:ipc_core", 98 "safwk:system_ability_fwk", 99 ] 100 101 remove_configs = [ "//build/config/compiler:no_exceptions" ] 102 103 configs = [ 104 "//base/useriam/pin_auth/services:pin_auth_services_config", 105 "//base/useriam/user_auth_framework/common:iam_log_config", 106 "//base/useriam/pin_auth/frameworks/:pinauth_ipc_config", 107 "//base/useriam/user_auth_framework/common:iam_utils_config", 108 ] 109} 110