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( 16 "//foundation/distributedhardware/distributed_camera/distributedcamera.gni") 17 18module_out_path = "distributed_camera/dcamera_protocol_test" 19 20config("module_private_config") { 21 visibility = [ ":*" ] 22 include_dirs = [ 23 "//commonlibrary/c_utils/base/include", 24 "//utils/system/safwk/native/include", 25 "//drivers/peripheral/base", 26 "${fwk_common_path}/log/include", 27 "${fwk_common_path}/utils/include", 28 "${fwk_utils_path}/include/log", 29 "${fwk_utils_path}/include", 30 ] 31 32 include_dirs += [ 33 "${innerkits_path}/native_cpp/camera_source/include", 34 "${innerkits_path}/native_cpp/camera_sink/include", 35 "${innerkits_path}/native_cpp/camera_source/include/callback", 36 "${services_path}/cameraservice/base/include", 37 "${common_path}/include/constants", 38 "${common_path}/include/utils", 39 ] 40} 41 42ohos_unittest("DCameraProtocolTest") { 43 module_out_path = module_out_path 44 45 sources = [ "dcamera_protocol_test.cpp" ] 46 47 configs = [ ":module_private_config" ] 48 49 deps = [ 50 "${common_path}:distributed_camera_utils", 51 "${fwk_utils_path}:distributedhardwareutils", 52 "${services_path}/cameraservice/sourceservice:distributed_camera_source", 53 "//third_party/googletest:gtest_main", 54 "//third_party/jsoncpp:jsoncpp", 55 ] 56 57 external_deps = [ 58 "c_utils:utils", 59 "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.0", 60 "dsoftbus:softbus_client", 61 "hiviewdfx_hilog_native:libhilog", 62 "ipc:ipc_core", 63 ] 64 65 defines = [ 66 "HI_LOG_ENABLE", 67 "DH_LOG_TAG=\"DCameraProtocolTest\"", 68 "LOG_DOMAIN=0xD004100", 69 ] 70} 71 72group("dcamera_protocol_test") { 73 testonly = true 74 deps = [ ":DCameraProtocolTest" ] 75} 76