• 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 = "useriam/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    "hilog:libhilog",
57    "safwk:system_ability_fwk",
58    "user_auth_framework:userauth_executors",
59  ]
60
61  remove_configs = [ "//build/config/compiler:no_exceptions" ]
62
63  subsystem_name = "useriam"
64  part_name = "face_auth"
65}
66
67ohos_unittest("face_auth_screen_brightness_test") {
68  sanitize = {
69    integer_overflow = true
70    ubsan = true
71    boundary_sanitize = true
72    cfi = true
73    cfi_cross_dso = true
74    debug = false
75    blocklist = "../../cfi_blocklist.txt"
76  }
77  branch_protector_ret = "pac_ret"
78  module_out_path = "useriam/face_auth"
79
80  include_dirs = [ "mock" ]
81
82  sources = [ "face_auth_screen_brightness_test.cpp" ]
83
84  deps = [ "../../services:faceauthservice_source_set" ]
85
86  external_deps = [
87    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
88    "drivers_interface_face_auth:libface_auth_proxy_2.0",
89    "googletest:gmock_main",
90    "googletest:gtest_main",
91    "graphic_surface:surface",
92    "hilog:libhilog",
93    "safwk:system_ability_fwk",
94    "user_auth_framework:userauth_executors",
95  ]
96
97  remove_configs = [ "//build/config/compiler:no_exceptions" ]
98
99  subsystem_name = "useriam"
100  part_name = "face_auth"
101}
102
103ohos_unittest("face_auth_perm_test") {
104  sanitize = {
105    integer_overflow = true
106    ubsan = true
107    boundary_sanitize = true
108    cfi = true
109    cfi_cross_dso = true
110    debug = false
111    blocklist = "../../cfi_blocklist.txt"
112  }
113  branch_protector_ret = "pac_ret"
114  module_out_path = "useriam/face_auth"
115
116  sources = [ "face_auth_service_perm_test.cpp" ]
117
118  include_dirs = [ "mock" ]
119
120  deps = [
121    "../../frameworks/ipc:faceauth_framework_stub",
122    "../../services:faceauthservice_source_set",
123  ]
124
125  external_deps = [
126    "access_token:libaccesstoken_sdk",
127    "access_token:libnativetoken",
128    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
129    "drivers_interface_face_auth:libface_auth_proxy_2.0",
130    "googletest:gmock_main",
131    "googletest:gtest_main",
132    "graphic_surface:surface",
133    "hilog:libhilog",
134    "safwk:system_ability_fwk",
135    "user_auth_framework:userauth_executors",
136  ]
137
138  remove_configs = [ "//build/config/compiler:no_exceptions" ]
139
140  subsystem_name = "useriam"
141  part_name = "face_auth"
142}
143
144group("faceauth_unittest") {
145  testonly = true
146  deps = [
147    ":face_auth_perm_test",
148    ":face_auth_screen_brightness_test",
149    ":face_auth_service_test",
150  ]
151}
152