# Copyright (c) 2023 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("//build/test.gni") import("//foundation/graphic/graphic_2d/graphic_config.gni") module_output_path = "graphic_2d/bootanimation" group("unittest") { testonly = true deps = [ ":bootanimation_test" ] } ohos_unittest("bootanimation_test") { module_out_path = module_output_path sources = [ "$graphic_2d_root/frameworks/bootanimation/src/boot_animation_controller.cpp", "$graphic_2d_root/frameworks/bootanimation/src/boot_animation_operation.cpp", "$graphic_2d_root/frameworks/bootanimation/src/boot_animation_strategy.cpp", "$graphic_2d_root/frameworks/bootanimation/src/boot_picture_player.cpp", "$graphic_2d_root/frameworks/bootanimation/src/boot_sound_player.cpp", "$graphic_2d_root/frameworks/bootanimation/src/boot_video_player.cpp", "$graphic_2d_root/frameworks/bootanimation/src/util.cpp", "boot_animation_controller_test.cpp", "boot_animation_operation_test.cpp", "boot_animation_utils_test.cpp", "boot_picture_player_test.cpp", ] configs = [ ":bootanimation_test_config" ] deps = [ "$graphic_2d_root:libbootanimation_utils", "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics", "$graphic_2d_root/rosen/modules/composer:libcomposer", "$graphic_2d_root/rosen/modules/render_service:librender_service", "$graphic_2d_root/rosen/modules/render_service_base/src/platform:platform", "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client", "//third_party/googletest:gtest_main", ] if (defined(use_new_render_context) && use_new_render_context) { deps += [ "$graphic_2d_root/rosen/modules/render_service_base/src/render_backend:librender_backend" ] } external_deps = [ "cJSON:cjson_static", "c_utils:utils", "config_policy:configpolicy_util", "hitrace:hitrace_meter", "init:libbegetutil", "zlib:libz", ] if (player_framework_enable) { external_deps += [ "player_framework:media_client" ] } if (is_standard_system) { external_deps += [ "init:libbegetutil" ] } else { external_deps += [ "startup:syspara" ] } subsystem_name = "graphic" part_name = "graphic_2d" } config("bootanimation_test_config") { visibility = [ ":*" ] include_dirs = [ "$graphic_2d_root/frameworks/bootanimation/include", "$graphic_2d_root/interfaces/inner_api/bootanimation", ] cflags = [ "-Wall", "-Werror", "-g3", "-Dprivate=public", "-Dprotected=public", ] defines = [] defines += gpu_defines if (player_framework_enable) { defines += [ "PLAYER_FRAMEWORK_ENABLE" ] } if (defined(use_rosen_drawing) && use_rosen_drawing) { defines += [ "USE_ROSEN_DRAWING" ] } }