• 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/test.gni")
15
16ohos_unittest("face_auth_service_test") {
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 = "face_auth/face_auth"
28
29  sources = [
30    "face_auth_all_in_one_executor_hdi_unit_test.cpp",
31    "face_auth_driver_hdi_unit_test.cpp",
32    "face_auth_executor_callback_hdi_unit_test.cpp",
33    "face_auth_service_test.cpp",
34    "sa_command_manager_unit_test.cpp",
35    "state_machine_test.cpp",
36  ]
37
38  include_dirs = [ "mock" ]
39
40  deps = [
41    "../../frameworks/ipc:faceauth_framework_stub",
42    "../../services:faceauthservice_source_set",
43    "../../services_ex:faceauthservice_ex_source_set",
44  ]
45
46  external_deps = [
47    "access_token:libaccesstoken_sdk",
48    "access_token:libnativetoken",
49    "access_token:libtoken_setproc",
50    "access_token:libtokenid_sdk",
51    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
52    "drivers_interface_face_auth:libface_auth_proxy_2.0",
53    "googletest:gmock_main",
54    "googletest:gtest_main",
55    "graphic_surface:surface",
56    "hdf_core:libhdf_utils",
57    "hilog:libhilog",
58    "safwk:system_ability_fwk",
59    "user_auth_framework:userauth_executors",
60  ]
61
62  remove_configs = [ "//build/config/compiler:no_exceptions" ]
63
64  subsystem_name = "useriam"
65  part_name = "face_auth"
66}
67
68ohos_unittest("face_auth_screen_brightness_test") {
69  sanitize = {
70    integer_overflow = true
71    ubsan = true
72    boundary_sanitize = true
73    cfi = true
74    cfi_cross_dso = true
75    debug = false
76    blocklist = "../../cfi_blocklist.txt"
77  }
78  branch_protector_ret = "pac_ret"
79  module_out_path = "face_auth/face_auth"
80
81  include_dirs = [ "mock" ]
82
83  sources = [ "face_auth_screen_brightness_test.cpp" ]
84
85  deps = [ "../../services:faceauthservice_source_set" ]
86
87  external_deps = [
88    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
89    "drivers_interface_face_auth:libface_auth_proxy_2.0",
90    "googletest:gmock_main",
91    "googletest:gtest_main",
92    "graphic_surface:surface",
93    "hdf_core:libhdf_utils",
94    "hilog:libhilog",
95    "safwk:system_ability_fwk",
96    "user_auth_framework:userauth_executors",
97  ]
98
99  remove_configs = [ "//build/config/compiler:no_exceptions" ]
100
101  subsystem_name = "useriam"
102  part_name = "face_auth"
103}
104
105ohos_unittest("face_auth_perm_test") {
106  sanitize = {
107    integer_overflow = true
108    ubsan = true
109    boundary_sanitize = true
110    cfi = true
111    cfi_cross_dso = true
112    debug = false
113    blocklist = "../../cfi_blocklist.txt"
114  }
115  branch_protector_ret = "pac_ret"
116  module_out_path = "face_auth/face_auth"
117
118  sources = [ "face_auth_service_perm_test.cpp" ]
119
120  include_dirs = [ "mock" ]
121
122  deps = [
123    "../../frameworks/ipc:faceauth_framework_stub",
124    "../../services:faceauthservice_source_set",
125  ]
126
127  external_deps = [
128    "access_token:libaccesstoken_sdk",
129    "access_token:libnativetoken",
130    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
131    "drivers_interface_face_auth:libface_auth_proxy_2.0",
132    "googletest:gmock_main",
133    "googletest:gtest_main",
134    "graphic_surface:surface",
135    "hdf_core:libhdf_utils",
136    "hilog:libhilog",
137    "safwk:system_ability_fwk",
138    "user_auth_framework:userauth_executors",
139  ]
140
141  remove_configs = [ "//build/config/compiler:no_exceptions" ]
142
143  subsystem_name = "useriam"
144  part_name = "face_auth"
145}
146
147group("faceauth_unittest") {
148  testonly = true
149  deps = [
150    ":face_auth_perm_test",
151    ":face_auth_screen_brightness_test",
152    ":face_auth_service_test",
153  ]
154}
155