mirror of
https://github.com/openharmony/drivers_peripheral.git
synced 2026-08-25 02:23:31 -04:00
57b9204aaf
Signed-off-by: jiazhenyu <jiazhenyu1@huawei.com>
98 lines
3.0 KiB
Plaintext
98 lines
3.0 KiB
Plaintext
# Copyright (c) 2021 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("//drivers/peripheral/camera/hal/camera.gni")
|
|
|
|
if (defined(ohos_lite)) {
|
|
import("//build/lite/config/test.gni")
|
|
import("//drivers/hdf_core/adapter/uhdf/uhdf.gni")
|
|
|
|
config("buffer_manager_utest_config") {
|
|
visibility = [ ":*" ]
|
|
|
|
cflags_cc = []
|
|
cflags_cc += [ "-std=c++17" ]
|
|
}
|
|
|
|
unittest("camera_hal_buffer_manager_unittest") {
|
|
output_extension = "bin"
|
|
output_dir = "$root_out_dir/test/unittest/hdf"
|
|
sources = [ "unittest/buffer_manager_utest.cpp" ]
|
|
include_dirs = [
|
|
"$camera_path/include",
|
|
"$camera_path/buffer_manager/include",
|
|
"$camera_path/buffer_manager/src/buffer_adapter/lite",
|
|
"//third_party/googletest/googletest/include",
|
|
"//base/hiviewdfx/interfaces/innerkits/libhilog/include",
|
|
"//drivers/hdf_core/framework/include/utils",
|
|
"//drivers/hdf_core/adapter/uhdf2/osal/include",
|
|
"//drivers/peripheral/base",
|
|
"//drivers/peripheral/display/interfaces/include",
|
|
"//foundation/graphic/surface/interfaces/kits",
|
|
"//foundation/graphic/surface/interfaces/innerkits",
|
|
]
|
|
deps = [ "$camera_path/buffer_manager:camera_buffer_manager" ]
|
|
}
|
|
} else {
|
|
import("//build/test.gni")
|
|
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
|
|
|
module_output_path = "hdf/camera"
|
|
|
|
config("buffer_manager_utest_config") {
|
|
visibility = [ ":*" ]
|
|
|
|
cflags_cc = []
|
|
|
|
ldflags = [ "--coverage" ]
|
|
}
|
|
ohos_unittest("camera_hal_buffer_manager_unittest") {
|
|
testonly = true
|
|
module_out_path = module_output_path
|
|
sources = [ "unittest/buffer_manager_utest.cpp" ]
|
|
|
|
include_dirs = [
|
|
"$camera_path/include",
|
|
"$camera_path/buffer_manager/include",
|
|
"$camera_path/buffer_manager/src/buffer_adapter/standard",
|
|
"//third_party/googletest/googletest/include",
|
|
"//drivers/peripheral/camera/interfaces/metadata/include",
|
|
]
|
|
|
|
deps = [
|
|
"$camera_path/buffer_manager:camera_buffer_manager",
|
|
"//drivers/interface/camera/v1_0:libcamera_stub_1.0",
|
|
"//third_party/googletest:gmock_main",
|
|
"//third_party/googletest:gtest",
|
|
"//third_party/googletest:gtest_main",
|
|
]
|
|
|
|
if (is_standard_system) {
|
|
external_deps = [
|
|
"c_utils:utils",
|
|
"hdf_core:libhdf_utils",
|
|
"hiviewdfx_hilog_native:libhilog",
|
|
"samgr:samgr_proxy",
|
|
]
|
|
} else {
|
|
external_deps = [ "hilog:libhilog" ]
|
|
}
|
|
|
|
external_deps += [
|
|
"ipc:ipc_single",
|
|
"samgr:samgr_proxy",
|
|
]
|
|
public_configs = [ ":buffer_manager_utest_config" ]
|
|
}
|
|
}
|