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