• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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")
15
16module_out_path = "graphic_standard/render_service_client"
17
18group("unittest") {
19  testonly = true
20
21  deps = [
22    ":RSDirtyManagerTest",
23    ":RSDisplayModeTest",
24    ":RSDropframeTest",
25    ":RSEventTest",
26    ":RSInterfacesTest",
27    ":RSJankDetectorTest",
28    ":RSRegionTest",
29    ":RSTunnelHandleTest",
30    "animation:RSAnimationTest",
31  ]
32}
33
34## Build RSJankDetectorTest
35ohos_unittest("RSJankDetectorTest") {
36  module_out_path = module_out_path
37  sources = [
38    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client/core/jank_detector/rs_jank_detector.cpp",
39    "rs_jank_detector_test.cpp",
40  ]
41  deps = [ ":rs_client_test_common" ]
42  external_deps = [ "hisysevent_native:libhisysevent" ]
43}
44
45## Build RSInterfacesTest
46ohos_unittest("RSInterfacesTest") {
47  module_out_path = module_out_path
48  sources = [ "rs_interfaces_test.cpp" ]
49  deps = [ ":rs_client_test_common" ]
50}
51
52## Build RSDropframeTest
53ohos_unittest("RSDropframeTest") {
54  module_out_path = module_out_path
55  sources = [ "rs_dropframe_test.cpp" ]
56  deps = [ ":rs_client_test_common" ]
57}
58
59## Build RSDirtyManagerTest
60ohos_unittest("RSDirtyManagerTest") {
61  module_out_path = module_out_path
62  sources = [ "rs_dirty_manager_test.cpp" ]
63  deps = [ ":rs_client_test_common" ]
64}
65
66## Build RSDisplayModeTest
67ohos_unittest("RSDisplayModeTest") {
68  module_out_path = module_out_path
69  sources = [ "rs_display_mode_test.cpp" ]
70  deps = [ ":rs_client_test_common" ]
71}
72
73## Build TunnelHandleTest
74ohos_unittest("RSTunnelHandleTest") {
75  module_out_path = module_out_path
76  sources = [ "rs_tunnel_handle_test.cpp" ]
77  deps = [ ":rs_client_test_common" ]
78}
79
80## Build RSEventTest
81ohos_unittest("RSEventTest") {
82  module_out_path = module_out_path
83  sources = [ "rs_event_test.cpp" ]
84  deps = [ ":rs_client_test_common" ]
85}
86
87## Build RSRegionTest
88ohos_unittest("RSRegionTest") {
89  module_out_path = module_out_path
90  sources = [ "rs_region_test.cpp" ]
91  deps = [
92    ":rs_client_test_common",
93    "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:render_service_base_src",
94  ]
95}
96
97## Build rs_client_test_common.a {{{
98config("rs_client_test_common_public_config") {
99  include_dirs = [
100    "//foundation/graphic/graphic_2d/frameworks/surface/include",
101    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client/core",
102  ]
103
104  cflags = [
105    "-Wall",
106    "-Werror",
107    "-g3",
108    "-Dprivate=public",
109    "-Dprotected=public",
110  ]
111}
112
113ohos_static_library("rs_client_test_common") {
114  visibility = [ ":*" ]
115  testonly = true
116
117  public_configs = [ ":rs_client_test_common_public_config" ]
118
119  public_deps = [
120    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
121    "//commonlibrary/c_utils/base:utils",
122    "//foundation/graphic/graphic_2d:libsurface",
123    "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base",
124    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
125    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
126    "//third_party/googletest:gtest_main",
127  ]
128  subsystem_name = "graphic"
129  part_name = "graphic_standard"
130}
131## Build rs_client_test_common.a }}}
132