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")
15import("../../../windowmanager_aafwk.gni")
16
17module_out_path = "window_manager/dms"
18
19group("systemtest") {
20  testonly = true
21
22  deps = [
23    ":dms_display_change_test",
24    ":dms_display_manager_test",
25    ":dms_display_minimal_test",
26    ":dms_display_power_test",
27    ":dms_display_update_test",
28    ":dms_private_window_test",
29    ":dms_screen_manager_test",
30    ":dms_screenshot_test",
31  ]
32}
33
34ohos_systemtest("dms_private_window_test") {
35  module_out_path = module_out_path
36
37  sources = [ "private_window_test.cpp" ]
38
39  deps = [ ":dms_systemtest_common" ]
40
41  external_deps = [
42    "c_utils:utils",
43    "hilog:libhilog",
44  ]
45}
46
47ohos_systemtest("dms_display_minimal_test") {
48  module_out_path = module_out_path
49
50  sources = [ "display_minimal_test.cpp" ]
51
52  deps = [ ":dms_systemtest_common" ]
53
54  external_deps = [
55    "c_utils:utils",
56    "hilog:libhilog",
57  ]
58}
59
60ohos_systemtest("dms_display_manager_test") {
61  module_out_path = module_out_path
62
63  sources = [ "display_manager_test.cpp" ]
64
65  deps = [ ":dms_systemtest_common" ]
66
67  external_deps = [
68    "c_utils:utils",
69    "hilog:libhilog",
70  ]
71}
72
73ohos_systemtest("dms_display_power_test") {
74  module_out_path = module_out_path
75
76  sources = [ "display_power_test.cpp" ]
77
78  deps = [ ":dms_systemtest_common" ]
79
80  external_deps = [
81    "c_utils:utils",
82    "hilog:libhilog",
83  ]
84}
85
86ohos_systemtest("dms_display_change_test") {
87  module_out_path = module_out_path
88
89  sources = [ "display_change_test.cpp" ]
90
91  deps = [ ":dms_systemtest_common" ]
92
93  external_deps = [
94    "c_utils:utils",
95    "hilog:libhilog",
96  ]
97}
98
99ohos_systemtest("dms_screenshot_test") {
100  module_out_path = module_out_path
101
102  sources = [ "screenshot_test.cpp" ]
103
104  deps = [ ":dms_systemtest_common" ]
105
106  external_deps = [
107    "c_utils:utils",
108    "hilog:libhilog",
109  ]
110}
111
112ohos_systemtest("dms_screen_manager_test") {
113  module_out_path = module_out_path
114
115  sources = [ "screen_manager_test.cpp" ]
116
117  deps = [ ":dms_systemtest_common" ]
118
119  external_deps = [
120    "c_utils:utils",
121    "hilog:libhilog",
122    "init:libbegetutil",
123  ]
124}
125
126ohos_systemtest("dms_screen_gamut_test") {
127  module_out_path = module_out_path
128
129  sources = [ "screen_gamut_test.cpp" ]
130
131  deps = [ ":dms_systemtest_common" ]
132
133  external_deps = [
134    "c_utils:utils",
135    "hilog:libhilog",
136  ]
137}
138
139ohos_systemtest("dms_display_update_test") {
140  module_out_path = module_out_path
141
142  sources = [ "display_update_test.cpp" ]
143
144  deps = [ ":dms_systemtest_common" ]
145
146  external_deps = [
147    "c_utils:utils",
148    "hilog:libhilog",
149  ]
150}
151
152## Build dms_systemtest_common.a {{{
153config("dms_systemtest_common_public_config") {
154  include_dirs = [
155    "../../../dm/include",
156    "../../../dmserver/include",
157    "../../../interfaces/innerkits/dm",
158    "../../../interfaces/innerkits/wm",
159    "../../common/utils/include",
160    "../../../utils/include",
161
162    # RSSurface
163    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client",
164  ]
165}
166
167ohos_static_library("dms_systemtest_common") {
168  visibility = [ ":*" ]
169  testonly = true
170
171  sources = [ "display_test_utils.cpp" ]
172
173  public_configs = [
174    ":dms_systemtest_common_public_config",
175    "../../../resources/config/build:coverage_flags",
176    "../../../resources/config/build:testcase_flags",
177  ]
178
179  public_deps = [
180    "${window_base_path}/dm:libdm",
181    "${window_base_path}/utils:libwmutil",
182    "${window_base_path}/utils:libwmutil_base",
183    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
184    "${window_base_path}/wm:libwm",
185    "../../../dmserver:libdms",
186    "../../common/utils:libtestutil",
187    "//commonlibrary/c_utils/base:utils",
188    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
189    "//foundation/multimodalinput/input/frameworks/proxy:libmmi-client",
190    "//third_party/googletest:gmock",
191    "//third_party/googletest:gtest_main",
192  ]
193
194  external_deps = [
195    "access_token:libaccesstoken_sdk",
196    "access_token:libnativetoken",
197    "access_token:libtoken_setproc",
198    "c_utils:utils",
199    "graphic_surface:surface",
200    "hilog:libhilog",
201    "ipc:ipc_single",
202  ]
203  subsystem_name = "window"
204  part_name = "window_manager"
205}
206## Build dms_systemtest_common.a }}}
207