• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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("//base/security/security_guard/security_guard.gni")
15import("//build/test.gni")
16
17ohos_unittest("SecurityGuardModelManagerTest") {
18  install_enable = true
19  part_name = "security_guard"
20  subsystem_name = "securitycloudgovernance"
21  module_out_path = part_name + "/" + part_name
22
23  #resource_config_file = "resource/ohos_test.xml"
24
25  include_dirs = [
26    "include",
27    "${sg_root_dir}/services/data_collect/store/include",
28    "${sg_root_dir}/frameworks/common/constants/include",
29    "${sg_root_dir}/frameworks/common/json/include",
30    "${sg_root_dir}/frameworks/common/task_handler/include",
31    "${sg_root_dir}/frameworks/common/database/include",
32    "${sg_root_dir}/frameworks/common/log/include",
33    "${sg_root_dir}/frameworks/common/utils/include",
34    "${sg_root_dir}/services/risk_classify/model_manager",
35    "${sg_root_dir}/test/unittest/mock/config_manager",
36    "${sg_root_dir}/interfaces/inner_api/common/include",
37  ]
38
39  sources = [
40    "${sg_root_dir}/services/risk_classify/model_manager/src/config_operate.cpp",
41    "${sg_root_dir}/services/risk_classify/model_manager/src/db_operate.cpp",
42    "${sg_root_dir}/services/risk_classify/model_manager/src/model_manager.cpp",
43    "${sg_root_dir}/services/risk_classify/model_manager/src/model_manager_impl.cpp",
44    "src/security_guard_model_manager_test.cpp",
45  ]
46
47  deps = [
48    "${sg_root_dir}/frameworks/common/classify:libsg_classify_sdk",
49    "${sg_root_dir}/services/config_manager:sg_config_manager",
50    "${sg_root_dir}/services/data_collect:sg_collect_service",
51  ]
52
53  external_deps = [
54    "c_utils:utils",
55    "googletest:gmock",
56    "hilog:libhilog",
57    "ipc:ipc_core",
58    "json:nlohmann_json_static",
59    "safwk:system_ability_fwk",
60    "samgr:samgr_proxy",
61    "sqlite:sqlite",
62    "ffrt:libffrt",
63  ]
64}
65
66group("unittest") {
67  testonly = true
68  deps = [ ":SecurityGuardModelManagerTest" ]
69}
70