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/test.gni") 15 16ohos_unittest("FingerprintAuthServiceUnitTest") { 17 sanitize = { 18 integer_overflow = true 19 ubsan = true 20 boundary_sanitize = true 21 cfi = true 22 cfi_cross_dso = true 23 debug = false 24 blocklist = "../../cfi_blocklist.txt" 25 } 26 branch_protector_ret = "pac_ret" 27 module_out_path = "useriam/fingerprint_auth" 28 29 sources = [ 30 "fingerprint_auth_all_in_one_executor_hdi_unit_test.cpp", 31 "fingerprint_auth_driver_hdi_unit_test.cpp", 32 "fingerprint_auth_executor_callback_hdi_unit_test.cpp", 33 "sa_command_manager_unit_test.cpp", 34 "screen_state_monitor_unit_test.cpp", 35 ] 36 37 include_dirs = [ "mock" ] 38 39 deps = [ 40 "../../services:fingerprintauthservice_source_set", 41 "../../services_ex:fingerprintauthservice_ex_source_set", 42 ] 43 44 external_deps = [ 45 "drivers_interface_fingerprint_auth:libfingerprint_auth_proxy_2.0", 46 "googletest:gmock_main", 47 "googletest:gtest_main", 48 "graphic_2d:librender_service_client", 49 "hilog:libhilog", 50 "user_auth_framework:userauth_executors", 51 "window_manager:libdm", 52 ] 53 54 remove_configs = [ "//build/config/compiler:no_exceptions" ] 55 56 subsystem_name = "useriam" 57 part_name = "fingerprint_auth" 58} 59 60ohos_unittest("FingerprintSensorIlluminationTest") { 61 sanitize = { 62 integer_overflow = true 63 ubsan = true 64 boundary_sanitize = true 65 cfi = true 66 cfi_cross_dso = true 67 debug = false 68 blocklist = "../../cfi_blocklist.txt" 69 } 70 branch_protector_ret = "pac_ret" 71 module_out_path = "useriam/fingerprint_auth" 72 73 sources = [ "fingerprint_auth_sensor_illumination_test.cpp" ] 74 75 deps = [ "../../services:fingerprintauthservice_source_set" ] 76 77 external_deps = [ 78 "display_manager:displaymgr", 79 "drivers_interface_fingerprint_auth:libfingerprint_auth_proxy_2.0", 80 "googletest:gtest_main", 81 "graphic_2d:librender_service_client", 82 "hilog:libhilog", 83 "user_auth_framework:userauth_executors", 84 "window_manager:libdm", 85 ] 86 87 remove_configs = [ "//build/config/compiler:no_exceptions" ] 88 89 subsystem_name = "useriam" 90 part_name = "fingerprint_auth" 91} 92 93group("fingerprintauth_unittest") { 94 testonly = true 95 96 deps = [ 97 ":FingerprintAuthServiceUnitTest", 98 ":FingerprintSensorIlluminationTest", 99 ] 100} 101