• 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/customization/enterprise_device_management/edm.gni")
15import("//build/test.gni")
16
17module_output_path = "enterprise_device_management/services"
18
19config("module_private_config") {
20  visibility = [ ":*" ]
21}
22
23ohos_unittest("EdmDeviceMgrAbilityUnitTest") {
24  module_out_path = module_output_path
25
26  include_dirs = [
27    "//commonlibrary/c_utils/base/include",
28    "//utils/system/safwk/native/include",
29    "$EDM_SA_ROOT/include",
30    "$EDM_SA_ROOT/include/utils",
31    "//commonlibrary/c_utils/base:utils_config",
32    JSONCPP_INCLUDE_DIR,
33    "$SUBSYSTEM_DIR/test/unittest/include",
34    "$SUBSYSTEM_DIR/interfaces/inner_api/include",
35    "$SUBSYSTEM_DIR/test/unittest/mock/include",
36  ]
37
38  sources = [
39    "$SUBSYSTEM_DIR/test/unittest/mock/src/bundle_manager_mock.cpp",
40    "$SUBSYSTEM_DIR/test/unittest/mock/src/edm_sys_manager_mock.cpp",
41    "$SUBSYSTEM_DIR/test/unittest/src/cmd_utils.cpp",
42    "./enterprise_device_mgr_ability_test/enterprise_device_mgr_ability_test.cpp",
43  ]
44
45  configs = [
46    ":module_private_config",
47    "//base/customization/enterprise_device_management/common/config:coverage_flags",
48  ]
49
50  deps = [
51    "$EDM_INNERKITS_PATH:edmservice_kits",
52    "$EDM_SA_ROOT:edmservice",
53    "//third_party/googletest:gmock_main",
54    "//third_party/googletest:gtest_main",
55    "//third_party/jsoncpp:jsoncpp",
56  ]
57
58  external_deps = [
59    "ability_base:want",
60    "ability_runtime:ability_manager",
61    "access_token:libaccesstoken_sdk",
62    "access_token:libnativetoken",
63    "access_token:libtoken_setproc",
64    "bundle_framework:appexecfwk_base",
65    "bundle_framework:appexecfwk_core",
66    "c_utils:utils",
67    "common_event_service:cesfwk_innerkits",
68    "ipc:ipc_core",
69    "safwk:system_ability_fwk",
70    "samgr:samgr_proxy",
71  ]
72
73  if (is_standard_system) {
74    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
75  } else {
76    external_deps += [ "hilog:libhilog" ]
77  }
78
79  subsystem_name = "customization"
80  part_name = "enterprise_device_management"
81}
82
83group("unittest") {
84  testonly = true
85
86  deps = [
87    # deps file
88    ":EdmDeviceMgrAbilityUnitTest",
89  ]
90}
91