16ea96550Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 26ea96550Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 36ea96550Sopenharmony_ci# you may not use this file except in compliance with the License. 46ea96550Sopenharmony_ci# You may obtain a copy of the License at 56ea96550Sopenharmony_ci# 66ea96550Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 76ea96550Sopenharmony_ci# 86ea96550Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 96ea96550Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 106ea96550Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 116ea96550Sopenharmony_ci# See the License for the specific language governing permissions and 126ea96550Sopenharmony_ci# limitations under the License. 136ea96550Sopenharmony_ci 146ea96550Sopenharmony_ciimport("//base/security/security_guard/security_guard.gni") 156ea96550Sopenharmony_ciimport("//build/test.gni") 166ea96550Sopenharmony_ci 176ea96550Sopenharmony_ciohos_unittest("SecurityGuardModelManagerTest") { 186ea96550Sopenharmony_ci install_enable = true 196ea96550Sopenharmony_ci part_name = "security_guard" 206ea96550Sopenharmony_ci subsystem_name = "security" 216ea96550Sopenharmony_ci module_out_path = part_name + "/" + part_name 226ea96550Sopenharmony_ci 236ea96550Sopenharmony_ci #resource_config_file = "resource/ohos_test.xml" 246ea96550Sopenharmony_ci 256ea96550Sopenharmony_ci include_dirs = [ 266ea96550Sopenharmony_ci "include", 276ea96550Sopenharmony_ci "${sg_root_dir}/services/data_collect/store/include", 286ea96550Sopenharmony_ci "${sg_root_dir}/frameworks/common/constants/include", 296ea96550Sopenharmony_ci "${sg_root_dir}/frameworks/common/json/include", 306ea96550Sopenharmony_ci "${sg_root_dir}/frameworks/common/task_handler/include", 316ea96550Sopenharmony_ci "${sg_root_dir}/frameworks/common/database/include", 326ea96550Sopenharmony_ci "${sg_root_dir}/frameworks/common/log/include", 336ea96550Sopenharmony_ci "${sg_root_dir}/frameworks/common/utils/include", 346ea96550Sopenharmony_ci "${sg_root_dir}/services/risk_classify/model_manager", 356ea96550Sopenharmony_ci "${sg_root_dir}/test/unittest/mock/config_manager", 366ea96550Sopenharmony_ci "${sg_root_dir}/interfaces/inner_api/common/include", 376ea96550Sopenharmony_ci ] 386ea96550Sopenharmony_ci 396ea96550Sopenharmony_ci sources = [ 406ea96550Sopenharmony_ci "${sg_root_dir}/services/risk_classify/model_manager/src/config_operate.cpp", 416ea96550Sopenharmony_ci "${sg_root_dir}/services/risk_classify/model_manager/src/db_operate.cpp", 426ea96550Sopenharmony_ci "${sg_root_dir}/services/risk_classify/model_manager/src/model_manager.cpp", 436ea96550Sopenharmony_ci "${sg_root_dir}/services/risk_classify/model_manager/src/model_manager_impl.cpp", 446ea96550Sopenharmony_ci "src/security_guard_model_manager_test.cpp", 456ea96550Sopenharmony_ci ] 466ea96550Sopenharmony_ci 476ea96550Sopenharmony_ci deps = [ 486ea96550Sopenharmony_ci "${sg_root_dir}/services/config_manager:sg_config_manager", 496ea96550Sopenharmony_ci "${sg_root_dir}/services/data_collect:sg_collect_service", 506ea96550Sopenharmony_ci ] 516ea96550Sopenharmony_ci 526ea96550Sopenharmony_ci external_deps = [ 536ea96550Sopenharmony_ci "c_utils:utils", 546ea96550Sopenharmony_ci "googletest:gmock", 556ea96550Sopenharmony_ci "hilog:libhilog", 566ea96550Sopenharmony_ci "ipc:ipc_core", 576ea96550Sopenharmony_ci "json:nlohmann_json_static", 586ea96550Sopenharmony_ci "relational_store:native_rdb", 596ea96550Sopenharmony_ci "safwk:system_ability_fwk", 606ea96550Sopenharmony_ci "samgr:samgr_proxy", 616ea96550Sopenharmony_ci ] 626ea96550Sopenharmony_ci} 636ea96550Sopenharmony_ci 646ea96550Sopenharmony_cigroup("unittest") { 656ea96550Sopenharmony_ci testonly = true 666ea96550Sopenharmony_ci deps = [ ":SecurityGuardModelManagerTest" ] 676ea96550Sopenharmony_ci} 68