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("EdmDeviceMgrProxyUnitTest") { 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/edm_sys_manager_mock.cpp", 40 "$SUBSYSTEM_DIR/test/unittest/src/cmd_utils.cpp", 41 "./enterprise_device_mgr_proxy_test/enterprise_device_mgr_proxy_test.cpp", 42 "./enterprise_device_mgr_proxy_test/enterprise_device_mgr_stub_mock.cpp", 43 "./enterprise_device_mgr_proxy_test/enterprise_device_mgr_stub_mock.h", 44 ] 45 46 configs = [ 47 ":module_private_config", 48 "//base/customization/enterprise_device_management/common/config:coverage_flags", 49 ] 50 51 deps = [ 52 "$EDM_INNERKITS_PATH:edmservice_kits", 53 "$EDM_SA_ROOT:edmservice", 54 "//third_party/googletest:gmock_main", 55 "//third_party/googletest:gtest_main", 56 "//third_party/jsoncpp:jsoncpp", 57 ] 58 59 external_deps = [ 60 "ability_base:want", 61 "ability_runtime:ability_manager", 62 "bundle_framework:appexecfwk_base", 63 "bundle_framework:appexecfwk_core", 64 "c_utils:utils", 65 "common_event_service:cesfwk_innerkits", 66 "ipc:ipc_core", 67 "safwk:system_ability_fwk", 68 "samgr:samgr_proxy", 69 ] 70 71 if (is_standard_system) { 72 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 73 } else { 74 external_deps += [ "hilog:libhilog" ] 75 } 76 77 subsystem_name = "customization" 78 part_name = "enterprise_device_management" 79} 80 81group("unittest") { 82 testonly = true 83 84 deps = [ 85 # deps file 86 ":EdmDeviceMgrProxyUnitTest", 87 ] 88} 89