• 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
16module_output_path = "enterprise_device_management/enterprise_device_management"
17
18config("module_private_config") {
19  visibility = [ ":*" ]
20}
21
22ohos_unittest("EdmDeviceMgrProxyUnitTest") {
23  module_out_path = module_output_path
24
25  include_dirs = [
26    "../include",
27    "../mock/include",
28  ]
29
30  sources = [
31    "../mock/src/edm_sys_manager_mock.cpp",
32    "../src/utils.cpp",
33    "./enterprise_device_mgr_proxy_test/enterprise_device_mgr_proxy_test.cpp",
34    "./enterprise_device_mgr_proxy_test/enterprise_device_mgr_stub_mock.cpp",
35    "./enterprise_device_mgr_proxy_test/enterprise_device_mgr_stub_mock.h",
36  ]
37
38  configs = [
39    ":module_private_config",
40    "../../../common/config:coverage_flags",
41  ]
42
43  deps = [
44    "../../../common/native:edm_commom",
45    "../../../interfaces/inner_api:edmservice_kits",
46    "//third_party/googletest:gmock_main",
47    "//third_party/googletest:gtest_main",
48    "//third_party/jsoncpp:jsoncpp",
49  ]
50
51  external_deps = [
52    "ability_base:want",
53    "access_token:libaccesstoken_sdk",
54    "access_token:libnativetoken",
55    "access_token:libtoken_setproc",
56    "c_utils:utils",
57    "hilog:libhilog",
58    "init:libbegetutil",
59    "ipc:ipc_core",
60    "netmanager_base:net_conn_manager_if",
61    "os_account:os_account_innerkits",
62    "samgr:samgr_proxy",
63  ]
64
65  sanitize = {
66    boundary_sanitize = true
67    cfi = true
68    cfi_cross_dso = true
69    debug = false
70    integer_overflow = true
71    ubsan = true
72    blocklist = "../cfi_blocklist.txt"
73  }
74  branch_protector_ret = "pac_ret"
75  subsystem_name = "customization"
76  part_name = "enterprise_device_management"
77}
78
79group("unittest") {
80  testonly = true
81
82  deps = [
83    # deps file
84    ":EdmDeviceMgrProxyUnitTest",
85  ]
86}
87