• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2024 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_app_floating_window_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
45  if (!window_manager_use_sceneboard) {
46    deps += [
47      ":wms_window_animation_transition_test",
48      ":wms_window_dialogwindow_test",
49      ":wms_window_display_zoom_test",
50      ":wms_window_drag_test",
51      ":wms_window_effect_test",
52      ":wms_window_focus_test",
53      ":wms_window_gamut_test",
54      ":wms_window_immersive_test",
55      ":wms_window_layout_test",
56      ":wms_window_move_drag_test",
57    ]
58  }
59  if (window_manager_use_sceneboard) {
60    deps += [
61      ":wms_window_callback_test",
62      ":wms_window_decor_test",
63      ":wms_window_layout_integration_test",
64      ":wms_window_pc_test",
65      ":wms_window_specialwindow_test",
66    ]
67  }
68}
69
70ohos_systemtest("wms_window_layout_test") {
71  module_out_path = module_out_path
72
73  sources = [ "window_layout_test.cpp" ]
74
75  include_dirs = [
76    "${window_base_path}/window_scene/test/mock",
77    "${window_base_path}/window_scene/interfaces/include",
78  ]
79
80  deps = [
81    ":wms_systemtest_common",
82    "${window_base_path}/test/common/utils:libtestutil",
83    "${window_base_path}/window_scene/common:window_scene_common",
84    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
85    "${window_base_path}/window_scene/session:scene_session",
86  ]
87
88  external_deps = [
89    "c_utils:utils",
90    "hilog:libhilog",
91    "power_manager:powermgr_client",
92  ]
93}
94
95ohos_systemtest("wms_window_layout_integration_test") {
96  module_out_path = module_out_path
97
98  sources = [ "window_layout_integration_test.cpp" ]
99
100  include_dirs = [
101    "${window_base_path}/window_scene/test/mock",
102    "${window_base_path}/window_scene/interfaces/include",
103  ]
104
105  deps = [
106    ":wms_systemtest_common",
107    "${window_base_path}/test/common/utils:libtestutil",
108    "${window_base_path}/window_scene/common:window_scene_common",
109    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
110    "${window_base_path}/window_scene/session:scene_session",
111  ]
112
113  external_deps = [
114    "c_utils:utils",
115    "hilog:libhilog",
116    "power_manager:powermgr_client",
117  ]
118}
119
120ohos_systemtest("wms_window_effect_test") {
121  module_out_path = module_out_path
122
123  sources = [ "window_effect_test.cpp" ]
124
125  deps = [
126    ":wms_systemtest_common",
127    "${window_base_path}/test/common/utils:libtestutil",
128  ]
129
130  external_deps = [
131    "c_utils:utils",
132    "hilog:libhilog",
133    "power_manager:powermgr_client",
134  ]
135}
136
137ohos_systemtest("wms_window_multi_ability_test") {
138  module_out_path = module_out_path
139
140  sources = [ "window_multi_ability_test.cpp" ]
141
142  deps = [ ":wms_systemtest_common" ]
143
144  external_deps = [
145    "c_utils:utils",
146    "hilog:libhilog",
147    "power_manager:powermgr_client",
148  ]
149}
150
151ohos_systemtest("wms_window_subwindow_test") {
152  module_out_path = module_out_path
153
154  sources = [ "window_subwindow_test.cpp" ]
155
156  deps = [ ":wms_systemtest_common" ]
157
158  external_deps = [
159    "bundle_framework:appexecfwk_base",
160    "c_utils:utils",
161    "hilog:libhilog",
162  ]
163}
164
165ohos_systemtest("wms_window_systemsubwindow_test") {
166  module_out_path = module_out_path
167
168  sources = [ "window_systemsubwindow_test.cpp" ]
169
170  deps = [
171    ":wms_systemtest_common",
172    "${window_base_path}/test/common/utils:libtestutil",
173  ]
174
175  external_deps = [
176    "bundle_framework:appexecfwk_base",
177    "c_utils:utils",
178    "hilog:libhilog",
179    "power_manager:powermgr_client",
180  ]
181}
182
183ohos_systemtest("wms_window_dialogwindow_test") {
184  module_out_path = module_out_path
185
186  sources = [ "window_dialogwindow_test.cpp" ]
187
188  deps = [ ":wms_systemtest_common" ]
189
190  external_deps = [
191    "bundle_framework:appexecfwk_base",
192    "c_utils:utils",
193    "common_event_service:cesfwk_innerkits",
194    "hilog:libhilog",
195  ]
196}
197
198ohos_systemtest("wms_window_immersive_test") {
199  module_out_path = module_out_path
200
201  sources = [ "window_immersive_test.cpp" ]
202
203  deps = [ ":wms_systemtest_common" ]
204
205  external_deps = [
206    "c_utils:utils",
207    "hilog:libhilog",
208    "power_manager:powermgr_client",
209  ]
210}
211
212ohos_systemtest("wms_window_focus_test") {
213  module_out_path = module_out_path
214
215  sources = [ "window_focus_test.cpp" ]
216
217  deps = [ ":wms_systemtest_common" ]
218
219  external_deps = [
220    "c_utils:utils",
221    "hilog:libhilog",
222    "power_manager:powermgr_client",
223  ]
224}
225
226ohos_systemtest("wms_window_split_immersive_test") {
227  module_out_path = module_out_path
228
229  sources = [ "window_split_immersive_test.cpp" ]
230
231  deps = [ ":wms_systemtest_common" ]
232
233  external_deps = [
234    "c_utils:utils",
235    "hilog:libhilog",
236    "power_manager:powermgr_client",
237  ]
238}
239
240ohos_systemtest("wms_window_split_test") {
241  module_out_path = module_out_path
242
243  sources = [ "window_split_test.cpp" ]
244
245  deps = [ ":wms_systemtest_common" ]
246
247  external_deps = [
248    "c_utils:utils",
249    "hilog:libhilog",
250    "power_manager:powermgr_client",
251  ]
252}
253
254ohos_systemtest("wms_window_move_drag_test") {
255  module_out_path = module_out_path
256
257  sources = [ "window_move_drag_test.cpp" ]
258
259  deps = [ ":wms_systemtest_common" ]
260
261  external_deps = [
262    "bundle_framework:appexecfwk_base",
263    "c_utils:utils",
264    "hilog:libhilog",
265    "power_manager:powermgr_client",
266  ]
267}
268
269ohos_systemtest("wms_window_input_method_test") {
270  module_out_path = module_out_path
271
272  sources = [ "window_input_method_test.cpp" ]
273
274  deps = [ ":wms_systemtest_common" ]
275
276  external_deps = [
277    "c_utils:utils",
278    "hilog:libhilog",
279    "power_manager:powermgr_client",
280  ]
281}
282
283ohos_systemtest("wms_window_gamut_test") {
284  module_out_path = module_out_path
285
286  sources = [ "window_gamut_test.cpp" ]
287
288  deps = [ ":wms_systemtest_common" ]
289
290  external_deps = [
291    "c_utils:utils",
292    "hilog:libhilog",
293    "power_manager:powermgr_client",
294  ]
295}
296
297ohos_systemtest("wms_window_gesture_navigation_enabled_test") {
298  module_out_path = module_out_path
299
300  sources = [ "window_gesture_navigation_enabled_test.cpp" ]
301
302  deps = [ ":wms_systemtest_common" ]
303
304  external_deps = [
305    "c_utils:utils",
306    "hilog:libhilog",
307  ]
308}
309
310ohos_systemtest("wms_window_input_test") {
311  module_out_path = module_out_path
312
313  sources = [ "window_input_test.cpp" ]
314
315  deps = [ ":wms_systemtest_common" ]
316
317  external_deps = [
318    "c_utils:utils",
319    "hilog:libhilog",
320    "power_manager:powermgr_client",
321  ]
322}
323
324ohos_systemtest("wms_window_visibility_info_test") {
325  module_out_path = module_out_path
326
327  sources = [ "window_visibility_info_test.cpp" ]
328
329  deps = [ ":wms_systemtest_common" ]
330
331  external_deps = [
332    "c_utils:utils",
333    "hilog:libhilog",
334    "power_manager:powermgr_client",
335  ]
336}
337
338ohos_systemtest("wms_window_display_zoom_test") {
339  module_out_path = module_out_path
340
341  sources = [ "window_display_zoom_test.cpp" ]
342
343  deps = [ ":wms_systemtest_common" ]
344
345  external_deps = [
346    "c_utils:utils",
347    "hilog:libhilog",
348    "power_manager:powermgr_client",
349  ]
350}
351
352ohos_systemtest("wms_window_drag_test") {
353  module_out_path = module_out_path
354
355  sources = [ "window_drag_test.cpp" ]
356
357  deps = [ ":wms_systemtest_common" ]
358
359  external_deps = [
360    "c_utils:utils",
361    "hilog:libhilog",
362    "power_manager:powermgr_client",
363  ]
364}
365
366ohos_systemtest("wms_window_raisetoapptop_test") {
367  module_out_path = module_out_path
368
369  sources = [ "window_raisetoapptop_test.cpp" ]
370
371  deps = [
372    ":wms_systemtest_common",
373    "${window_base_path}/test/common/utils:libtestutil",
374  ]
375
376  external_deps = [
377    "c_utils:utils",
378    "hilog:libhilog",
379    "power_manager:powermgr_client",
380  ]
381}
382
383ohos_systemtest("wms_window_rotation_test") {
384  module_out_path = module_out_path
385
386  sources = [ "window_rotation_test.cpp" ]
387
388  deps = [ ":wms_systemtest_common" ]
389
390  external_deps = [
391    "c_utils:utils",
392    "hilog:libhilog",
393    "power_manager:powermgr_client",
394  ]
395}
396
397ohos_systemtest("wms_window_recover_test") {
398  module_out_path = module_out_path
399
400  sources = [ "window_recover_test.cpp" ]
401
402  include_dirs = [
403    "${window_base_path}/test/common/mock",
404    "${window_base_path}/window_scene/test/mock",
405    "${window_base_path}/window_scene/session/host/include/zidl",
406    "${window_base_path}/window_scene/common/include",
407  ]
408
409  deps = [
410    ":wms_systemtest_common",
411    "${window_base_path}/window_scene/common:window_scene_common",
412    "${window_base_path}/window_scene/session:scene_session",
413  ]
414
415  external_deps = [
416    "ability_runtime:app_context",
417    "accessibility:accessibility_common",
418    "c_utils:utils",
419    "hilog:libhilog",
420    "init:libbegetutil",
421  ]
422}
423
424ohos_systemtest("wms_window_occupied_area_change_test") {
425  module_out_path = module_out_path
426
427  sources = [ "window_occupied_area_change_test.cpp" ]
428
429  deps = [ ":wms_systemtest_common" ]
430
431  external_deps = [
432    "c_utils:utils",
433    "hilog:libhilog",
434    "power_manager:powermgr_client",
435  ]
436}
437
438ohos_systemtest("wms_window_touch_outside_test") {
439  module_out_path = module_out_path
440
441  sources = [ "window_touch_outside_test.cpp" ]
442
443  deps = [ ":wms_systemtest_common" ]
444
445  external_deps = [
446    "c_utils:utils",
447    "hilog:libhilog",
448    "power_manager:powermgr_client",
449  ]
450}
451
452ohos_systemtest("wms_window_mode_support_info_test") {
453  module_out_path = module_out_path
454
455  sources = [ "window_mode_support_info_test.cpp" ]
456
457  deps = [ ":wms_systemtest_common" ]
458
459  external_deps = [
460    "c_utils:utils",
461    "hilog:libhilog",
462    "power_manager:powermgr_client",
463  ]
464}
465
466ohos_systemtest("wms_window_app_floating_window_test") {
467  module_out_path = module_out_path
468
469  if (!window_manager_use_sceneboard) {
470    sources = [ "window_app_floating_window_test.cpp" ]
471  } else {
472    sources = [ "window_app_floating_window_scb_test.cpp" ]
473  }
474
475  sanitize = {
476    cfi = true
477    cfi_cross_dso = true
478    cfi_vcall_icall_only = true
479    debug = false
480  }
481
482  deps = [
483    ":wms_systemtest_common",
484    "${window_base_path}/test/common/utils:libtestutil",
485  ]
486
487  external_deps = [
488    "c_utils:utils",
489    "common_event_service:cesfwk_innerkits",
490    "hilog:libhilog",
491    "power_manager:powermgr_client",
492  ]
493}
494
495ohos_systemtest("wms_window_system_toast_window_test") {
496  module_out_path = module_out_path
497
498  sources = [ "window_system_toast_test.cpp" ]
499
500  deps = [ ":wms_systemtest_common" ]
501
502  external_deps = [
503    "c_utils:utils",
504    "common_event_service:cesfwk_innerkits",
505    "hilog:libhilog",
506    "power_manager:powermgr_client",
507  ]
508}
509
510ohos_systemtest("wms_window_animation_transition_test") {
511  module_out_path = module_out_path
512  sanitize = {
513    cfi = true
514    cfi_cross_dso = true
515    cfi_vcall_icall_only = true
516    debug = false
517  }
518  sources = [ "window_animation_transition_test.cpp" ]
519
520  deps = [
521    ":wms_systemtest_common",
522    "${window_base_path}/test/common/utils:libtestutil",
523  ]
524
525  external_deps = [
526    "c_utils:utils",
527    "hilog:libhilog",
528    "power_manager:powermgr_client",
529  ]
530}
531
532ohos_systemtest("wms_window_water_mark_test") {
533  module_out_path = module_out_path
534
535  sources = [ "window_water_mark_test.cpp" ]
536
537  deps = [ ":wms_systemtest_common" ]
538
539  external_deps = [
540    "c_utils:utils",
541    "hilog:libhilog",
542    "power_manager:powermgr_client",
543  ]
544}
545
546ohos_systemtest("wms_window_nointeraction_listener_test") {
547  module_out_path = module_out_path
548
549  sources = [ "window_nointeraction_listener_test.cpp" ]
550
551  deps = [ ":wms_systemtest_common" ]
552
553  external_deps = [
554    "c_utils:utils",
555    "hilog:libhilog",
556    "power_manager:powermgr_client",
557  ]
558}
559
560ohos_systemtest("wms_window_status_change_test") {
561  module_out_path = module_out_path
562
563  sources = [ "window_status_change_test.cpp" ]
564
565  include_dirs = [ "${window_base_path}/window_scene/test/mock" ]
566
567  deps = [
568    ":wms_systemtest_common",
569    "${window_base_path}/window_scene/common:window_scene_common",
570    "${window_base_path}/window_scene/session:scene_session",
571  ]
572
573  external_deps = [
574    "c_utils:utils",
575    "hilog:libhilog",
576    "power_manager:powermgr_client",
577  ]
578}
579
580ohos_systemtest("wms_window_callback_test") {
581  module_out_path = module_out_path
582
583  sources = [ "window_callback_test.cpp" ]
584
585  include_dirs = [ "${window_base_path}/window_scene/test/mock" ]
586
587  deps = [
588    ":wms_systemtest_common",
589    "${window_base_path}/window_scene/common:window_scene_common",
590    "${window_base_path}/window_scene/session:scene_session",
591  ]
592
593  external_deps = [
594    "c_utils:utils",
595    "hilog:libhilog",
596    "power_manager:powermgr_client",
597  ]
598}
599
600ohos_systemtest("wms_window_decor_test") {
601  module_out_path = module_out_path
602
603  sources = [ "window_decor_test.cpp" ]
604
605  include_dirs = [
606    "${window_base_path}/window_scene/test/mock",
607    "${window_base_path}/test/common/mock",
608  ]
609
610  deps = [
611    ":wms_systemtest_common",
612    "${window_base_path}/window_scene/common:window_scene_common",
613    "${window_base_path}/window_scene/session:scene_session",
614  ]
615
616  external_deps = [
617    "c_utils:utils",
618    "hilog:libhilog",
619    "power_manager:powermgr_client",
620  ]
621}
622
623ohos_systemtest("wms_window_specialwindow_test") {
624  module_out_path = module_out_path
625
626  sources = [ "window_specialwindow_test.cpp" ]
627
628  include_dirs = [ "${window_base_path}/window_scene/test/mock" ]
629
630  deps = [
631    ":wms_systemtest_common",
632    "${window_base_path}/window_scene/common:window_scene_common",
633    "${window_base_path}/window_scene/session:scene_session",
634  ]
635
636  external_deps = [
637    "c_utils:utils",
638    "hilog:libhilog",
639    "power_manager:powermgr_client",
640  ]
641}
642
643ohos_systemtest("wms_window_pc_test") {
644  module_out_path = module_out_path
645
646  sources = [ "window_pc_test.cpp" ]
647
648  include_dirs = [
649    "${window_base_path}/window_scene/test/mock",
650    "${window_base_path}/test/common/mock",
651  ]
652
653  deps = [
654    ":wms_systemtest_common",
655    "${window_base_path}/window_scene/common:window_scene_common",
656    "${window_base_path}/window_scene/session:scene_session",
657  ]
658
659  external_deps = [
660    "c_utils:utils",
661    "hilog:libhilog",
662    "power_manager:powermgr_client",
663  ]
664}
665
666## Build wms_systemtest_common.a {{{
667config("wms_systemtest_common_public_config") {
668  include_dirs = [
669    "${window_base_path}/dm/include",
670    "${window_base_path}/dmserver/include",
671    "${window_base_path}/wm/include",
672    "${window_base_path}/wmserver/include",
673    "${window_base_path}/interfaces/innerkits/wm",
674    "${window_base_path}/utils/include",
675    "${window_base_path}/test/common/utils/include",
676    "//commonlibrary/c_utils/base/include",
677    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
678    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
679    "//third_party/googletest/googlemock/include",
680    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include",
681
682    # for abilityContext
683    "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime",
684    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context",
685    "//base/global/resource_management/interfaces/inner_api/include",
686    "//third_party/node/deps/icu-small/source/common",
687    "${ability_runtime_inner_api_path}/ability_manager/include",
688
689    # abilityContext end
690  ]
691}
692
693ohos_static_library("wms_systemtest_common") {
694  visibility = [ ":*" ]
695  testonly = true
696
697  sources = [ "window_test_utils.cpp" ]
698
699  public_configs = [
700    ":wms_systemtest_common_public_config",
701    "${window_base_path}/resources/config/build:coverage_flags",
702    "${window_base_path}/resources/config/build:testcase_flags",
703  ]
704
705  public_deps = [
706    "//foundation/arkui/ace_engine/interfaces/inner_api/ace:ace_uicontent",
707
708    # need delete it for abilitycontext
709    "${ability_runtime_inner_api_path}/ability_manager:ability_manager",
710    "${window_base_path}/dm:libdm",
711    "${window_base_path}/dmserver:libdms",
712    "${window_base_path}/utils:libwmutil",
713    "${window_base_path}/utils:libwmutil_base",
714    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
715    "${window_base_path}/wm:libwm",
716    "//commonlibrary/c_utils/base:utils",
717    "//foundation/arkui/napi:ace_napi",
718    "//foundation/graphic/graphic_2d/rosen/modules/animation/window_animation:window_animation",
719    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
720    "//foundation/multimodalinput/input/frameworks/proxy:libmmi-client",
721    "//third_party/googletest:gmock",
722    "//third_party/googletest:gtest_main",
723  ]
724  external_deps = [
725    "ability_base:base",
726    "ability_base:want",
727    "ability_base:zuri",
728    "ability_runtime:ability_context_native",
729    "bundle_framework:appexecfwk_base",
730    "c_utils:utils",
731    "hilog:libhilog",
732    "ipc:ipc_single",
733    "power_manager:powermgr_client",
734  ]
735
736  part_name = "window_manager"
737  subsystem_name = "window"
738}
739## Build wms_systemtest_common.a }}}
740