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_sink_test" 19 20config("module_private_config") { 21 visibility = [ ":*" ] 22 include_dirs = [ 23 "//drivers/peripheral/camera/interfaces/metadata/include", 24 "//third_party/jsoncpp/include", 25 "//commonlibrary/c_utils/base/include", 26 "//utils/system/safwk/native/include", 27 "${graphicstandard_path}/frameworks/surface/include", 28 "${camerastandard_path}/interfaces/inner_api/native/camera/include", 29 "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", 30 "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", 31 "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", 32 "${camerastandard_path}/services/camera_service/binder/base/include", 33 "${camerastandard_path}/services/camera_service/binder/client/include", 34 "${camerastandard_path}/services/camera_service/binder/server/include", 35 "${camerastandard_path}/services/camera_service/include", 36 ] 37 38 include_dirs += [ 39 "${common_path}/include/constants", 40 "${common_path}/include/utils", 41 "${fwk_common_path}/utils/include", 42 "${innerkits_path}/native_cpp/camera_sink/include", 43 "${services_path}/cameraservice/base/include", 44 "${services_path}/cameraservice/cameraoperator/handler/include", 45 "${services_path}/cameraservice/sinkservice/include/distributedcamera", 46 ] 47} 48 49ohos_unittest("DistributedCameraSinkServiceTest") { 50 module_out_path = module_out_path 51 52 sources = [ 53 "dcamera_sink_hidumper_test.cpp", 54 "distributed_camera_sink_service_test.cpp", 55 "distributed_camera_sink_stub_test.cpp", 56 ] 57 58 configs = [ ":module_private_config" ] 59 60 deps = [ 61 "${camerastandard_path}/frameworks/native/camera:camera_framework", 62 "${common_path}:distributed_camera_utils", 63 "${graphicstandard_path}:libsurface", 64 "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", 65 "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", 66 "${services_path}/cameraservice/sinkservice:distributed_camera_sink", 67 "//drivers/peripheral/camera/interfaces/metadata:metadata", 68 "//third_party/googletest:gtest_main", 69 "//third_party/jsoncpp:jsoncpp", 70 ] 71 72 external_deps = [ 73 "c_utils:utils", 74 "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.0", 75 "eventhandler:libeventhandler", 76 "hiviewdfx_hilog_native:libhilog", 77 "ipc:ipc_core", 78 "safwk:system_ability_fwk", 79 "samgr:samgr_proxy", 80 ] 81 82 defines = [ 83 "HI_LOG_ENABLE", 84 "DH_LOG_TAG=\"DCameraSinkServiceTest\"", 85 "LOG_DOMAIN=0xD004100", 86 ] 87} 88 89group("dcamera_sink_test") { 90 testonly = true 91 deps = [ ":DistributedCameraSinkServiceTest" ] 92} 93