1# Copyright (c) 2023 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("//foundation/graphic/graphic_surface/graphic_surface_config.gni") 16 17module_out_path = "graphic_surface/graphic_surface/utils" 18 19group("unittest") { 20 testonly = true 21 deps = [ ":BufferHandleTest" ] 22} 23 24## UnitTest buffer_handle_test {{{ 25ohos_unittest("BufferHandleTest") { 26 module_out_path = module_out_path 27 sources = [ "buffer_handle_test.cpp" ] 28 deps = [ ":buffer_handle_test_common" ] 29 external_deps = [ 30 "c_utils:utils", 31 "graphic_surface:buffer_handle", 32 "hilog:libhilog", 33 "ipc:ipc_core", 34 ] 35} 36 37## Build buffer_handle_test_common.a {{{ 38config("buffer_handle_test_config") { 39 cflags = [ 40 "-Wall", 41 "-Werror", 42 "-g3", 43 "-Dprivate=public", 44 "-Dprotected=public", 45 ] 46} 47 48## UnitTest buffer_handle_test }}} 49 50ohos_static_library("buffer_handle_test_common") { 51 visibility = [ ":*" ] 52 testonly = true 53 public_configs = [ ":buffer_handle_test_config" ] 54 55 public_deps = [ 56 "$graphic_surface_root/buffer_handle:buffer_handle_static", 57 ] 58 59 subsystem_name = "graphic" 60 part_name = "graphic_surface" 61} 62## Build buffer_handle_test_common.a }}} 63