# Copyright (c) 2021-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("./../../../../../multimedia_camera_framework.gni") module_output_path = "camera_framework/camera_framework_moduletest" ohos_moduletest("camera_framework_moduletest") { module_out_path = module_output_path include_dirs = [ "./include", "${graphic_surface_path}/surface/include", "${graphic_surface_path}/surface/include", "${multimedia_camera_framework_path}/services/camera_service/include", "${multimedia_camera_framework_path}/services/camera_service/include/avcodec", "${multimedia_camera_framework_path}/services/camera_service/include/avcodec/common", "${multimedia_camera_framework_path}/services/camera_service/binder/base/include", "${multimedia_camera_framework_path}/services/camera_service/binder/client/include", "${multimedia_camera_framework_path}/services/camera_service/binder/server/include", "${multimedia_camera_framework_path}/interfaces/inner_api/native/camera/include", "${multimedia_camera_framework_path}/interfaces/inner_api/native/test", "${multimedia_camera_framework_path}/services/deferred_processing_service/include/base/task_manager", "${multimedia_camera_framework_path}/services/deferred_processing_service/include/base/task_manager/task_group", "${base_security_path}/interfaces/innerkits/accesstoken/include", "${base_security_path}/interfaces/innerkits/token_setproc/include", "${multimedia_media_library_path}/interfaces/kits/c", ] sources = [ "${multimedia_camera_framework_path}/interfaces/inner_api/native/test/test_common.cpp", "src/camera_framework_moduletest.cpp", ] deps = [ "${multimedia_camera_framework_path}/frameworks/native/camera:camera_framework", "${multimedia_camera_framework_path}/services/camera_service:camera_service", "//drivers/interface/camera/v1_0:libcamera_proxy_1.0", ] external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libprivacy_sdk", "access_token:libtoken_setproc", "audio_framework:audio_capturer", "audio_framework:audio_client", "av_codec:av_codec_client", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "drivers_interface_camera:libbuffer_handle_sequenceable_1.0", "drivers_interface_camera:libcamera_proxy_1.0", "drivers_interface_camera:libcamera_proxy_1.1", "drivers_interface_camera:libmap_data_sequenceable_1.0", "drivers_interface_camera:metadata", "drivers_peripheral_display:hdi_gralloc_client", "graphic_surface:surface", "hdf_core:libhdi", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", "media_foundation:media_foundation", "media_foundation:native_media_core", "media_library:media_library", "media_library:media_library_manager", "safwk:system_ability_fwk", "samgr:samgr_proxy", "window_manager:libdm", ] defines = [ "private=public" ] if (use_sensor) { external_deps += [ "sensor:sensor_interface_native" ] defines += [ "CAMERA_USE_SENSOR" ] } include_dirs += [ "${driver_peripheral_path}/interfaces/include", "${driver_peripheral_path}/interfaces/hdi_ipc", "${driver_peripheral_path}/interfaces/hdi_ipc/utils/include", "${driver_peripheral_path}/interfaces/hdi_ipc/server/include", "${driver_peripheral_path}/interfaces/hdi_ipc/callback/device/include", "${driver_peripheral_path}/interfaces/hdi_ipc/callback/operator/include", "${driver_peripheral_path}/interfaces/hdi_ipc/callback/host/include", ] cflags = [ "-fPIC" ] cflags_cc = cflags sanitize = { cfi = false cfi_cross_dso = false debug = false blocklist = "../../../../../cfi_blocklist.txt" } }