# Copyright (c) 2024-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/security/security_guard/security_guard.gni") import("//build/test.gni") ohos_unittest("inner_api_test") { install_enable = true part_name = "security_guard" subsystem_name = "securitycloudgovernance" module_out_path = part_name + "/" + part_name include_dirs = [ "include", "${sg_root_dir}/frameworks/common/constants/include", "${sg_root_dir}/frameworks/common/log/include", "${sg_root_dir}/interfaces/inner_api/common/include", "${sg_root_dir}/interfaces/inner_api/collector/include", "${sg_root_dir}/frameworks/common/collector/include", "${sg_root_dir}/interfaces/inner_api/collect/include", "${sg_root_dir}/frameworks/common/collect/include", "${sg_root_dir}/interfaces/inner_api/classify/include", "${sg_root_dir}/frameworks/common/classify/include", "${sg_root_dir}/services/security_collector/include", "${sg_root_dir}/frameworks/common/utils/include", ] sources = [ "${sg_root_dir}/frameworks/common/classify/src/risk_analysis_manager_callback_service.cpp", "${sg_root_dir}/frameworks/common/classify/src/risk_analysis_manager_callback_stub.cpp", "${sg_root_dir}/frameworks/common/classify/src/sg_classify_client.cpp", "${sg_root_dir}/frameworks/common/collect/src/acquire_data_manager_callback_service.cpp", "${sg_root_dir}/frameworks/common/collect/src/acquire_data_manager_callback_stub.cpp", "${sg_root_dir}/frameworks/common/collect/src/data_collect_manager.cpp", "${sg_root_dir}/frameworks/common/collect/src/data_collect_manager_callback_service.cpp", "${sg_root_dir}/frameworks/common/collect/src/data_collect_manager_callback_stub.cpp", "${sg_root_dir}/frameworks/common/collect/src/security_event_query_callback_service.cpp", "${sg_root_dir}/frameworks/common/collect/src/security_event_query_callback_stub.cpp", "${sg_root_dir}/frameworks/common/collector/src/collector_manager.cpp", "${sg_root_dir}/frameworks/common/collector/src/collector_service_loader.cpp", "${sg_root_dir}/frameworks/common/collector/src/i_collector.cpp", "${sg_root_dir}/frameworks/common/collector/src/i_collector_fwk.cpp", "${sg_root_dir}/frameworks/common/collector/src/i_collector_subscriber.cpp", "${sg_root_dir}/frameworks/common/collector/src/security_collector_manager_callback_service.cpp", "${sg_root_dir}/frameworks/common/collector/src/security_collector_manager_callback_stub.cpp", "${sg_root_dir}/frameworks/common/collector/src/security_collector_manager_proxy.cpp", "${sg_root_dir}/frameworks/common/collector/src/security_collector_subscribe_info.cpp", "${sg_root_dir}/frameworks/common/collector/src/security_event.cpp", "${sg_root_dir}/frameworks/common/collector/src/security_event_ruler.cpp", "src/inner_api_collector_test.cpp", ] deps = [ "${sg_root_dir}/services/data_collect/idl:data_collect_manager_idl_sa_proxy", "${sg_root_dir}/services/risk_classify/idl:risk_analysis_manager_idl_sa_proxy", ] external_deps = [ "c_utils:utils", "googletest:gmock", "hilog:libhilog", "ipc:ipc_core", "samgr:samgr_proxy", ] sanitize = { cfi = true cfi_cross_dso = true } } group("unittest") { testonly = true deps = [ ":inner_api_test" ] }