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("//drivers/adapter/uhdf2/uhdf.gni") 16import("../../camera.gni") 17 18module_output_path = "hdf/buffer_manager_test" 19 20config("buffer_manager_utest_config") { 21 visibility = [ ":*" ] 22 23 cflags_cc = [ "-Wno-unused-parameter" ] 24 25 ldflags = [ "--coverage" ] 26} 27ohos_unittest("buffer_manager_unittest") { 28 testonly = true 29 module_out_path = module_output_path 30 sources = [ "unittest/buffer_manager_utest.cpp" ] 31 32 include_dirs = [ 33 "$camera_path/include", 34 "$camera_path/buffer_manager/include", 35 "//third_party/googletest/googletest/include", 36 "//third_party/googletest/googletest/include", 37 "//utils/native/base/include", 38 "//foundation/communication/interfaces/innerkits/ipc_core/include", 39 "//base/hiviewdfx/interfaces/innerkits/libhilog/include", 40 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", 41 "//drivers/framework/include/utils", 42 "//drivers/adapter/uhdf2/osal/include", 43 ] 44 45 deps = [ 46 "$camera_path/buffer_manager:camera_buffer_manager", 47 "//foundation/graphic/standard:libsurface", 48 "//third_party/googletest:gmock_main", 49 "//third_party/googletest:gtest", 50 "//third_party/googletest:gtest_main", 51 "//utils/native/base:utils", 52 ] 53 54 if (is_standard_system) { 55 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 56 } else { 57 external_deps = [ "hilog:libhilog" ] 58 } 59 60 external_deps += [ 61 "ipc:ipc_core", 62 "samgr_L2:samgr_proxy", 63 ] 64 public_configs = [ ":buffer_manager_utest_config" ] 65} 66