1# Copyright (c) 2022 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_2d/graphic_config.gni") 16 17module_output_path = "graphic_standard/rosen/modules/2d_graphics/render_context" 18 19group("unittest") { 20 testonly = true 21 22 deps = [ 23 ":2d_graphics_shader_cache_test", 24 ":RenderContextTest", 25 ] 26} 27 28## Build RenderContextTest 29ohos_unittest("RenderContextTest") { 30 module_out_path = module_output_path 31 sources = [ "render_context_test.cpp" ] 32 deps = [ ":render_context" ] 33} 34 35## Build render_context.a {{{ 36config("render_context_public_config") { 37 include_dirs = [ "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/render_context" ] 38 39 cflags = [ 40 "-Wall", 41 "-Werror", 42 "-g3", 43 "-Dprivate=public", 44 "-Dprotected=public", 45 ] 46} 47 48ohos_static_library("render_context") { 49 visibility = [ ":*" ] 50 testonly = true 51 52 public_configs = [ ":render_context_public_config" ] 53 54 public_deps = [ 55 "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base", 56 "//third_party/googletest:gtest_main", 57 ] 58 subsystem_name = "graphic" 59 part_name = "graphic_standard" 60} 61 62## Build render_context.a }}} 63 64ohos_unittest("2d_graphics_shader_cache_test") { 65 module_out_path = module_output_path 66 67 sources = [ 68 "cache_data_test.cpp", 69 "shader_cache_test.cpp", 70 ] 71 72 include_dirs = [ 73 "//foundation/graphic/graphic_2d/rosen/modules/2d_engine", 74 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/render_context", 75 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include", 76 "//third_party/flutter/skia/", 77 ] 78 79 deps = [ 80 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", 81 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics", 82 "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base", 83 "//third_party/googletest:gtest_main", 84 ] 85 86 defines = [] 87 defines += gpu_defines 88 89 part_name = "graphic_standard" 90 subsystem_name = "graphic" 91} 92