• 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.
13import("//build/ohos.gni")
14import("//build/test.gni")
15
16ohos_unittest("iam_executors_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  cflags = [
28    "-Dprivate=public",
29    "-Dprotected=public",
30  ]
31  include_dirs = [
32    "mock",
33    "../../../frameworks/native/executors/include",
34    "../../../interfaces/inner_api/iam_executor",
35    "../../../frameworks/native/executors/include/async_command",
36    "../../../frameworks/native/executors/include/framework",
37    "../../../frameworks/native/executors/include/listener",
38    "../../../common/utils",
39    "../../../common/logs",
40  ]
41
42  sources = [
43    "../../../frameworks/native/executors/src/async_command/abandon_command.cpp",
44    "../../../frameworks/native/executors/src/async_command/async_command_base.cpp",
45    "../../../frameworks/native/executors/src/async_command/auth_command.cpp",
46    "../../../frameworks/native/executors/src/async_command/collect_command.cpp",
47    "../../../frameworks/native/executors/src/async_command/custom_command.cpp",
48    "../../../frameworks/native/executors/src/async_command/enroll_command.cpp",
49    "../../../frameworks/native/executors/src/async_command/identify_command.cpp",
50    "../../../frameworks/native/executors/src/driver.cpp",
51    "../../../frameworks/native/executors/src/driver_manager.cpp",
52    "../../../frameworks/native/executors/src/executor.cpp",
53    "../../../frameworks/native/executors/src/framework/executor_mgr_wrapper.cpp",
54    "../../../frameworks/native/executors/src/framework/framework_executor_callback.cpp",
55    "../../../frameworks/native/executors/src/iauth_executor_hdi.cpp",
56    "../../../frameworks/native/executors/src/idriver_manager.cpp",
57    "../../../frameworks/native/executors/src/listener/auth_executor_mgr_status_listener.cpp",
58    "../../../frameworks/native/executors/src/listener/driver_manager_status_listener.cpp",
59    "abandon_command_unit_test.cpp",
60    "auth_command_unit_test.cpp",
61    "driver_manager_unit_test.cpp",
62    "enroll_command_unit_test.cpp",
63    "executor_unit_test.cpp",
64    "iauth_executor_hdi_test.cpp",
65    "identify_command_unit_test.cpp",
66  ]
67
68  remove_configs = [ "//build/config/compiler:no_exceptions" ]
69
70  deps = [
71    "../../../common:iam_utils",
72    "../../../frameworks/native/client:userauth_client",
73    "../../../frameworks/native/common:attributes",
74    "../../../frameworks/native/common:dfx",
75  ]
76
77  external_deps = [
78    "c_utils:utils",
79    "googletest:gmock_main",
80    "hdf_core:libhdf_host",
81    "hdf_core:libhdf_ipc_adapter",
82    "hdf_core:libhdf_utils",
83    "hdf_core:libhdi",
84    "hilog:libhilog",
85    "init:libbeget_proxy",
86    "init:libbegetutil",
87    "ipc:ipc_single",
88    "samgr:samgr_proxy",
89  ]
90
91  configs = [
92    "../../../common:iam_log_config",
93    "../../../common:iam_utils_config",
94  ]
95
96  module_out_path = "user_auth_framework/user_auth_framework"
97
98  subsystem_name = "useriam"
99  part_name = "user_auth_framework"
100}
101