• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2025 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/window_manager/wms"
18
19group("systemtest") {
20  testonly = true
21
22  deps = [
23    ":wms_window_animate_to_test",
24    ":wms_window_gesture_navigation_enabled_test",
25    ":wms_window_input_method_test",
26    ":wms_window_input_test",
27    ":wms_window_mode_support_info_test",
28    ":wms_window_multi_ability_test",
29    ":wms_window_nointeraction_listener_test",
30    ":wms_window_occupied_area_change_test",
31    ":wms_window_raisetoapptop_test",
32    ":wms_window_recover_test",
33    ":wms_window_rotation_test",
34    ":wms_window_split_immersive_test",
35    ":wms_window_split_test",
36    ":wms_window_status_change_test",
37    ":wms_window_subwindow_test",
38    ":wms_window_system_toast_window_test",
39    ":wms_window_systemsubwindow_test",
40    ":wms_window_touch_outside_test",
41    ":wms_window_visibility_info_test",
42    ":wms_window_water_mark_test",
43  ]
44  if (!window_manager_use_sceneboard) {
45    deps += [
46      ":wms_window_animation_transition_test",
47      ":wms_window_dialogwindow_test",
48      ":wms_window_display_zoom_test",
49      ":wms_window_drag_test",
50      ":wms_window_effect_test",
51      ":wms_window_focus_test",
52      ":wms_window_gamut_test",
53      ":wms_window_immersive_test",
54      ":wms_window_layout_test",
55      ":wms_window_move_drag_test",
56    ]
57  } else {
58    deps += [
59      ":wms_window_app_floating_window_test",
60      ":wms_window_callback_test",
61      ":wms_window_decor_test",
62      ":wms_window_layout_integration_test",
63      ":wms_window_pc_test",
64      ":wms_window_specialwindow_test",
65    ]
66  }
67}
68
69test_external_deps = [
70  "ability_base:base",
71  "ability_base:want",
72  "ability_base:zuri",
73  "ability_runtime:ability_context_native",
74  "ability_runtime:ability_manager",
75  "ability_runtime:app_context",
76  "accessibility:accessibility_common",
77  "ace_engine:ace_uicontent",
78  "bundle_framework:appexecfwk_base",
79  "cJSON:cjson_static",
80  "c_utils:utils",
81  "common_event_service:cesfwk_innerkits",
82  "googletest:gmock",
83  "googletest:gtest",
84  "googletest:gtest_main",
85  "graphic_2d:2d_graphics",
86  "graphic_2d:librender_service_base",
87  "graphic_2d:librender_service_client",
88  "graphic_2d:window_animation",
89  "hilog:libhilog",
90  "image_framework:image_native",
91  "init:libbegetutil",
92  "input:libmmi-client",
93  "ipc:ipc_core",
94  "ipc:ipc_single",
95  "napi:ace_napi",
96  "power_manager:powermgr_client",
97  "resource_management:global_resmgr",
98  "selinux_adapter:librestorecon",
99]
100
101ohos_systemtest("wms_window_animate_to_test") {
102  module_out_path = module_out_path
103
104  sources = [ "window_animate_to_test.cpp" ]
105
106  include_dirs = [
107    "${window_base_path}/window_scene/test/mock",
108    "${window_base_path}/window_scene/interfaces/include",
109  ]
110
111  deps = [
112    ":wms_systemtest_common",
113    "${window_base_path}/test/common/utils:libtestutil",
114    "${window_base_path}/window_scene/common:window_scene_common",
115    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
116    "${window_base_path}/window_scene/session:scene_session",
117  ]
118
119  external_deps = test_external_deps
120}
121
122ohos_systemtest("wms_window_layout_test") {
123  module_out_path = module_out_path
124
125  sources = [ "window_layout_test.cpp" ]
126
127  include_dirs = [
128    "${window_base_path}/window_scene/test/mock",
129    "${window_base_path}/window_scene/interfaces/include",
130  ]
131
132  deps = [
133    ":wms_systemtest_common",
134    "${window_base_path}/test/common/utils:libtestutil",
135    "${window_base_path}/window_scene/common:window_scene_common",
136    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
137    "${window_base_path}/window_scene/session:scene_session",
138  ]
139
140  external_deps = test_external_deps
141}
142
143ohos_systemtest("wms_window_layout_integration_test") {
144  module_out_path = module_out_path
145
146  sources = [ "window_layout_integration_test.cpp" ]
147
148  include_dirs = [
149    "${window_base_path}/window_scene/test/mock",
150    "${window_base_path}/window_scene/interfaces/include",
151  ]
152
153  deps = [
154    ":wms_systemtest_common",
155    "${window_base_path}/test/common/utils:libtestutil",
156    "${window_base_path}/window_scene/common:window_scene_common",
157    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
158    "${window_base_path}/window_scene/session:scene_session",
159  ]
160
161  external_deps = test_external_deps
162}
163
164ohos_systemtest("wms_window_effect_test") {
165  module_out_path = module_out_path
166
167  sources = [ "window_effect_test.cpp" ]
168
169  deps = [
170    ":wms_systemtest_common",
171    "${window_base_path}/test/common/utils:libtestutil",
172  ]
173
174  external_deps = test_external_deps
175}
176
177ohos_systemtest("wms_window_multi_ability_test") {
178  module_out_path = module_out_path
179
180  sources = [ "window_multi_ability_test.cpp" ]
181
182  deps = [ ":wms_systemtest_common" ]
183
184  external_deps = test_external_deps
185}
186
187ohos_systemtest("wms_window_subwindow_test") {
188  module_out_path = module_out_path
189
190  sources = [ "window_subwindow_test.cpp" ]
191
192  deps = [ ":wms_systemtest_common" ]
193
194  external_deps = test_external_deps
195}
196
197ohos_systemtest("wms_window_systemsubwindow_test") {
198  module_out_path = module_out_path
199
200  sources = [ "window_systemsubwindow_test.cpp" ]
201
202  deps = [
203    ":wms_systemtest_common",
204    "${window_base_path}/test/common/utils:libtestutil",
205  ]
206
207  external_deps = test_external_deps
208}
209
210ohos_systemtest("wms_window_dialogwindow_test") {
211  module_out_path = module_out_path
212
213  sources = [ "window_dialogwindow_test.cpp" ]
214
215  deps = [ ":wms_systemtest_common" ]
216
217  external_deps = test_external_deps
218}
219
220ohos_systemtest("wms_window_immersive_test") {
221  module_out_path = module_out_path
222
223  sources = [ "window_immersive_test.cpp" ]
224
225  deps = [ ":wms_systemtest_common" ]
226
227  external_deps = test_external_deps
228}
229
230ohos_systemtest("wms_window_focus_test") {
231  module_out_path = module_out_path
232
233  sources = [ "window_focus_test.cpp" ]
234
235  deps = [ ":wms_systemtest_common" ]
236
237  external_deps = test_external_deps
238}
239
240ohos_systemtest("wms_window_split_immersive_test") {
241  module_out_path = module_out_path
242
243  sources = [ "window_split_immersive_test.cpp" ]
244
245  deps = [ ":wms_systemtest_common" ]
246
247  external_deps = test_external_deps
248}
249
250ohos_systemtest("wms_window_split_test") {
251  module_out_path = module_out_path
252
253  sources = [ "window_split_test.cpp" ]
254
255  deps = [ ":wms_systemtest_common" ]
256
257  external_deps = test_external_deps
258}
259
260ohos_systemtest("wms_window_move_drag_test") {
261  module_out_path = module_out_path
262
263  sources = [ "window_move_drag_test.cpp" ]
264
265  deps = [ ":wms_systemtest_common" ]
266
267  external_deps = test_external_deps
268}
269
270ohos_systemtest("wms_window_input_method_test") {
271  module_out_path = module_out_path
272
273  sources = [ "window_input_method_test.cpp" ]
274
275  deps = [ ":wms_systemtest_common" ]
276
277  external_deps = test_external_deps
278}
279
280ohos_systemtest("wms_window_gamut_test") {
281  module_out_path = module_out_path
282
283  sources = [ "window_gamut_test.cpp" ]
284
285  deps = [ ":wms_systemtest_common" ]
286
287  external_deps = test_external_deps
288}
289
290ohos_systemtest("wms_window_gesture_navigation_enabled_test") {
291  module_out_path = module_out_path
292
293  sources = [ "window_gesture_navigation_enabled_test.cpp" ]
294
295  deps = [ ":wms_systemtest_common" ]
296
297  external_deps = test_external_deps
298}
299
300ohos_systemtest("wms_window_input_test") {
301  module_out_path = module_out_path
302
303  sources = [ "window_input_test.cpp" ]
304
305  deps = [ ":wms_systemtest_common" ]
306
307  external_deps = test_external_deps
308}
309
310ohos_systemtest("wms_window_visibility_info_test") {
311  module_out_path = module_out_path
312
313  sources = [ "window_visibility_info_test.cpp" ]
314
315  deps = [ ":wms_systemtest_common" ]
316
317  external_deps = test_external_deps
318}
319
320ohos_systemtest("wms_window_display_zoom_test") {
321  module_out_path = module_out_path
322
323  sources = [ "window_display_zoom_test.cpp" ]
324
325  deps = [ ":wms_systemtest_common" ]
326
327  external_deps = test_external_deps
328}
329
330ohos_systemtest("wms_window_drag_test") {
331  module_out_path = module_out_path
332
333  sources = [ "window_drag_test.cpp" ]
334
335  deps = [ ":wms_systemtest_common" ]
336
337  external_deps = test_external_deps
338}
339
340ohos_systemtest("wms_window_raisetoapptop_test") {
341  module_out_path = module_out_path
342
343  sources = [ "window_raisetoapptop_test.cpp" ]
344
345  deps = [
346    ":wms_systemtest_common",
347    "${window_base_path}/test/common/utils:libtestutil",
348  ]
349
350  external_deps = test_external_deps
351}
352
353ohos_systemtest("wms_window_rotation_test") {
354  module_out_path = module_out_path
355
356  sources = [ "window_rotation_test.cpp" ]
357
358  deps = [ ":wms_systemtest_common" ]
359
360  external_deps = test_external_deps
361}
362
363ohos_systemtest("wms_window_recover_test") {
364  module_out_path = module_out_path
365
366  sources = [ "window_recover_test.cpp" ]
367
368  include_dirs = [
369    "${window_base_path}/test/common/mock",
370    "${window_base_path}/window_scene/test/mock",
371    "${window_base_path}/window_scene/session/host/include/zidl",
372    "${window_base_path}/window_scene/common/include",
373  ]
374
375  deps = [
376    ":wms_systemtest_common",
377    "${window_base_path}/window_scene/common:window_scene_common",
378    "${window_base_path}/window_scene/session:scene_session",
379  ]
380
381  external_deps = test_external_deps
382}
383
384ohos_systemtest("wms_window_occupied_area_change_test") {
385  module_out_path = module_out_path
386
387  sources = [ "window_occupied_area_change_test.cpp" ]
388
389  deps = [ ":wms_systemtest_common" ]
390
391  external_deps = test_external_deps
392}
393
394ohos_systemtest("wms_window_touch_outside_test") {
395  module_out_path = module_out_path
396
397  sources = [ "window_touch_outside_test.cpp" ]
398
399  deps = [ ":wms_systemtest_common" ]
400
401  external_deps = test_external_deps
402}
403
404ohos_systemtest("wms_window_mode_support_info_test") {
405  module_out_path = module_out_path
406
407  sources = [ "window_mode_support_info_test.cpp" ]
408
409  deps = [ ":wms_systemtest_common" ]
410
411  external_deps = test_external_deps
412}
413
414ohos_systemtest("wms_window_app_floating_window_test") {
415  module_out_path = module_out_path
416
417  if (!window_manager_use_sceneboard) {
418    sources = [ "window_app_floating_window_test.cpp" ]
419  } else {
420    sources = [ "window_app_floating_window_scb_test.cpp" ]
421  }
422
423  sanitize = {
424    cfi = true
425    cfi_cross_dso = true
426    cfi_vcall_icall_only = true
427    debug = false
428  }
429
430  deps = [
431    ":wms_systemtest_common",
432    "${window_base_path}/test/common/utils:libtestutil",
433  ]
434
435  external_deps = test_external_deps
436}
437
438ohos_systemtest("wms_window_system_toast_window_test") {
439  module_out_path = module_out_path
440
441  sources = [ "window_system_toast_test.cpp" ]
442
443  deps = [ ":wms_systemtest_common" ]
444
445  external_deps = test_external_deps
446}
447
448ohos_systemtest("wms_window_animation_transition_test") {
449  module_out_path = module_out_path
450  sanitize = {
451    cfi = true
452    cfi_cross_dso = true
453    cfi_vcall_icall_only = true
454    debug = false
455  }
456  sources = [ "window_animation_transition_test.cpp" ]
457
458  deps = [
459    ":wms_systemtest_common",
460    "${window_base_path}/test/common/utils:libtestutil",
461  ]
462
463  external_deps = test_external_deps
464}
465
466ohos_systemtest("wms_window_water_mark_test") {
467  module_out_path = module_out_path
468
469  sources = [ "window_water_mark_test.cpp" ]
470
471  deps = [ ":wms_systemtest_common" ]
472
473  external_deps = test_external_deps
474}
475
476ohos_systemtest("wms_window_nointeraction_listener_test") {
477  module_out_path = module_out_path
478
479  sources = [ "window_nointeraction_listener_test.cpp" ]
480
481  deps = [ ":wms_systemtest_common" ]
482
483  external_deps = test_external_deps
484}
485
486ohos_systemtest("wms_window_status_change_test") {
487  module_out_path = module_out_path
488
489  sources = [ "window_status_change_test.cpp" ]
490
491  include_dirs = [ "${window_base_path}/window_scene/test/mock" ]
492
493  deps = [
494    ":wms_systemtest_common",
495    "${window_base_path}/window_scene/common:window_scene_common",
496    "${window_base_path}/window_scene/session:scene_session",
497  ]
498
499  external_deps = test_external_deps
500}
501
502ohos_systemtest("wms_window_callback_test") {
503  module_out_path = module_out_path
504
505  sources = [ "window_callback_test.cpp" ]
506
507  include_dirs = [ "${window_base_path}/window_scene/test/mock" ]
508
509  deps = [
510    ":wms_systemtest_common",
511    "${window_base_path}/window_scene/common:window_scene_common",
512    "${window_base_path}/window_scene/session:scene_session",
513  ]
514
515  external_deps = test_external_deps
516}
517
518ohos_systemtest("wms_window_decor_test") {
519  module_out_path = module_out_path
520
521  sources = [ "window_decor_test.cpp" ]
522
523  include_dirs = [
524    "${window_base_path}/window_scene/test/mock",
525    "${window_base_path}/test/common/mock",
526  ]
527
528  deps = [
529    ":wms_systemtest_common",
530    "${window_base_path}/window_scene/common:window_scene_common",
531    "${window_base_path}/window_scene/session:scene_session",
532  ]
533
534  external_deps = test_external_deps
535}
536
537ohos_systemtest("wms_window_specialwindow_test") {
538  module_out_path = module_out_path
539
540  sources = [ "window_specialwindow_test.cpp" ]
541
542  include_dirs = [ "${window_base_path}/window_scene/test/mock" ]
543
544  deps = [
545    ":wms_systemtest_common",
546    "${window_base_path}/window_scene/common:window_scene_common",
547    "${window_base_path}/window_scene/session:scene_session",
548  ]
549
550  external_deps = test_external_deps
551}
552
553ohos_systemtest("wms_window_pc_test") {
554  module_out_path = module_out_path
555
556  sources = [ "window_pc_test.cpp" ]
557
558  include_dirs = [
559    "${window_base_path}/window_scene/test/mock",
560    "${window_base_path}/test/common/mock",
561  ]
562
563  deps = [
564    ":wms_systemtest_common",
565    "${window_base_path}/window_scene/common:window_scene_common",
566    "${window_base_path}/window_scene/session:scene_session",
567  ]
568
569  external_deps = test_external_deps
570}
571
572## Build wms_systemtest_common.a {{{
573config("wms_systemtest_common_public_config") {
574  include_dirs = [
575    "${window_base_path}/dm/include",
576    "${window_base_path}/dmserver/include",
577    "${window_base_path}/wm/include",
578    "${window_base_path}/wmserver/include",
579    "${window_base_path}/interfaces/innerkits/wm",
580    "${window_base_path}/utils/include",
581    "${window_base_path}/test/common/utils/include",
582    "${dmserver_gen_path}",
583  ]
584}
585
586ohos_static_library("wms_systemtest_common") {
587  visibility = [ ":*" ]
588  testonly = true
589
590  sources = [ "window_test_utils.cpp" ]
591
592  public_configs = [
593    ":wms_systemtest_common_public_config",
594    "${window_base_path}/resources/config/build:coverage_flags",
595    "${window_base_path}/resources/config/build:testcase_flags",
596  ]
597
598  public_deps = [
599    "${window_base_path}/dm:libdm",
600    "${window_base_path}/dmserver:libdms",
601    "${window_base_path}/utils:libwmutil",
602    "${window_base_path}/utils:libwmutil_base",
603    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
604    "${window_base_path}/wm:libwm",
605  ]
606  external_deps = test_external_deps
607
608  part_name = "window_manager"
609  subsystem_name = "window"
610}
611## Build wms_systemtest_common.a }}}
612