• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/OH-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_strategy_test.cpp",
39    "boot_animation_utils_test.cpp",
40    "boot_picture_player_test.cpp",
41    "boot_sound_player_test.cpp",
42    "boot_video_player_test.cpp",
43    "util_test.cpp",
44  ]
45
46  configs = [ ":bootanimation_test_config" ]
47
48  deps = [
49    "$graphic_2d_root:libbootanimation_utils",
50    "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics",
51    "$graphic_2d_root/rosen/modules/composer:libcomposer",
52    "$graphic_2d_root/rosen/modules/render_service:librender_service",
53    "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base",
54    "$graphic_2d_root/rosen/modules/render_service_base/src/platform:platform",
55    "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client",
56  ]
57
58  public_external_deps = [ "cJSON:cjson" ]
59
60  external_deps = [
61    "cJSON:cjson",
62    "c_utils:utils",
63    "config_policy:configpolicy_util",
64    "eventhandler:libeventhandler",
65    "googletest:gtest_main",
66    "hilog:libhilog",
67    "hitrace:hitrace_meter",
68    "init:libbegetutil",
69    "samgr:samgr_proxy",
70    "zlib:libz",
71  ]
72
73  if (player_framework_enable) {
74    external_deps += [ "player_framework:media_client" ]
75  }
76
77  if (is_standard_system) {
78    external_deps += [ "init:libbegetutil" ]
79  } else {
80    external_deps += [ "startup:syspara" ]
81  }
82
83  subsystem_name = "graphic"
84  part_name = "graphic_2d"
85}
86
87config("bootanimation_test_config") {
88  visibility = [ ":*" ]
89  include_dirs = [
90    "$graphic_2d_root/frameworks/bootanimation/include",
91    "$graphic_2d_root/interfaces/inner_api/bootanimation",
92    "${graphic_2d_root}/utils/log",
93  ]
94
95  cflags = [
96    "-Wall",
97    "-Werror",
98    "-g3",
99    "-Dprivate=public",
100    "-Dprotected=public",
101  ]
102
103  defines = []
104  defines += gpu_defines
105  if (player_framework_enable) {
106    defines += [ "PLAYER_FRAMEWORK_ENABLE" ]
107  }
108
109  if (defined(use_rosen_drawing) && use_rosen_drawing) {
110    defines += [ "USE_ROSEN_DRAWING" ]
111  }
112}
113