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_2d/graphic_config.gni") 16 17module_output_path = "graphic_2d/bootanimation" 18 19group("unittest") { 20 testonly = true 21 22 deps = [ ":bootanimation_test" ] 23} 24 25ohos_unittest("bootanimation_test") { 26 module_out_path = module_output_path 27 28 sources = [ 29 "$graphic_2d_root/frameworks/bootanimation/src/boot_animation_controller.cpp", 30 "$graphic_2d_root/frameworks/bootanimation/src/boot_animation_operation.cpp", 31 "$graphic_2d_root/frameworks/bootanimation/src/boot_animation_strategy.cpp", 32 "$graphic_2d_root/frameworks/bootanimation/src/boot_picture_player.cpp", 33 "$graphic_2d_root/frameworks/bootanimation/src/boot_sound_player.cpp", 34 "$graphic_2d_root/frameworks/bootanimation/src/boot_video_player.cpp", 35 "$graphic_2d_root/frameworks/bootanimation/src/util.cpp", 36 "boot_animation_controller_test.cpp", 37 "boot_animation_operation_test.cpp", 38 "boot_animation_utils_test.cpp", 39 "boot_picture_player_test.cpp", 40 ] 41 42 configs = [ ":bootanimation_test_config" ] 43 44 deps = [ 45 "$graphic_2d_root:libbootanimation_utils", 46 "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics", 47 "$graphic_2d_root/rosen/modules/composer:libcomposer", 48 "$graphic_2d_root/rosen/modules/render_service:librender_service", 49 "$graphic_2d_root/rosen/modules/render_service_base/src/platform:platform", 50 "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client", 51 "//third_party/googletest:gtest_main", 52 ] 53 54 if (defined(use_new_render_context) && use_new_render_context) { 55 deps += [ "$graphic_2d_root/rosen/modules/render_service_base/src/render_backend:librender_backend" ] 56 } 57 58 external_deps = [ 59 "cJSON:cjson_static", 60 "c_utils:utils", 61 "config_policy:configpolicy_util", 62 "hitrace:hitrace_meter", 63 "init:libbegetutil", 64 "zlib:libz", 65 ] 66 67 if (player_framework_enable) { 68 external_deps += [ "player_framework:media_client" ] 69 } 70 71 if (is_standard_system) { 72 external_deps += [ "init:libbegetutil" ] 73 } else { 74 external_deps += [ "startup:syspara" ] 75 } 76 77 subsystem_name = "graphic" 78 part_name = "graphic_2d" 79} 80 81config("bootanimation_test_config") { 82 visibility = [ ":*" ] 83 include_dirs = [ 84 "$graphic_2d_root/frameworks/bootanimation/include", 85 "$graphic_2d_root/interfaces/inner_api/bootanimation", 86 ] 87 88 cflags = [ 89 "-Wall", 90 "-Werror", 91 "-g3", 92 "-Dprivate=public", 93 "-Dprotected=public", 94 ] 95 96 defines = [] 97 defines += gpu_defines 98 if (player_framework_enable) { 99 defines += [ "PLAYER_FRAMEWORK_ENABLE" ] 100 } 101 102 if (defined(use_rosen_drawing) && use_rosen_drawing) { 103 defines += [ "USE_ROSEN_DRAWING" ] 104 } 105} 106