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