1# Copyright (c) 2021 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") 15import("//foundation/distributedhardware/devicemanager/devicemanager.gni") 16module_out_path = "deviceManager_stander/inner_kits" 17 18group("unittest") { 19 testonly = true 20 21 deps = [ ":device_manager_impl_test" ] 22} 23 24## UnitTest device_manager_impl_test {{{ 25ohos_unittest("device_manager_impl_test") { 26 module_out_path = module_out_path 27 28 sources = [ "device_manager_impl_test.cpp" ] 29 30 deps = [ ":device_manager_test_common" ] 31} 32 33## UnitTest device_manager_impl_test }}} 34 35## Build device_manager_test_common.a {{{ 36config("device_manager_test_common_public_config") { 37 include_dirs = [ 38 "//utils/native/base/include", 39 "//utils/system/safwk/native/include", 40 "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include", 41 "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include/ipc/standard", 42 "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include/ipc", 43 "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include/notify", 44 "${utils_path}/include/log", 45 "${common_path}/include/ipc", 46 "${common_path}/include/ipc/model", 47 "${utils_path}/include/ipc/standard", 48 "${common_path}/include", 49 "//third_party/json/include", 50 ] 51 52 cflags = [ 53 "-Wall", 54 "-Werror", 55 "-g3", 56 "-Dprivate=public", 57 "-Dprotected=public", 58 ] 59} 60 61ohos_static_library("device_manager_test_common") { 62 testonly = true 63 64 visibility = [ ":*" ] 65 66 public_configs = [ ":device_manager_test_common_public_config" ] 67 68 public_deps = [ 69 "${utils_path}:devicemanagerutils", 70 "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", 71 "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp:devicemanagersdk", 72 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 73 "//third_party/googletest:gmock", 74 "//utils/native/base:utils", 75 "//utils/native/base:utils", 76 ] 77} 78## Build device_manager_test_common.a }}} 79