• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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_out_path = "graphic_2d/graphic_2d/composer"
18
19group("systemtest") {
20  testonly = true
21
22  deps = [
23    ":nativeVsync_getPeriod_test_st",
24    ":nativeVsync_requestFrame_test_st",
25    ":nativeVsync_requestMultiCB_test_st",
26    ":vsync_120to30_test_st",
27    ":vsync_120to60_test_st",
28    ":vsync_120to90_test_st",
29    ":vsync_30to120_test_st",
30    ":vsync_30to60_test_st",
31    ":vsync_30to90_test_st",
32    ":vsync_60to120_test_st",
33    ":vsync_60to30_test_st",
34    ":vsync_60to90_test_st",
35    ":vsync_90to120_test_st",
36    ":vsync_90to30_test_st",
37    ":vsync_90to60_test_st",
38    ":vsync_callbackeveryframe_test_st",
39    ":vsync_limit_test_st",
40    ":vsync_ltpo_test_st",
41    ":vsync_multicallback_test_st",
42    ":vsync_sample_test_st",
43    ":vsync_setvsyncrate_test_st",
44    ":vsync_test_st",
45  ]
46}
47
48## SystemTest vsync_test {{{
49ohos_unittest("vsync_test_st") {
50  module_out_path = module_out_path
51
52  sources = [ "vsync_test.cpp" ]
53
54  include_dirs = [
55    "//foundation/graphic/graphic_2d/interfaces/inner_api/common",
56    "//foundation/graphic/graphic_2d/rosen/modules/composer/vsync/include",
57    "//foundation/graphic/graphic_2d/rosen/modules/composer/vsync/test",
58  ]
59
60  cflags = [
61    "-Wall",
62    "-Werror",
63    "-g3",
64  ]
65
66  deps = [
67    "//foundation/graphic/graphic_2d/rosen/modules/composer/vsync:libvsync",
68    "//foundation/graphic/graphic_2d/utils:socketpair",
69  ]
70  external_deps = [
71    "access_token:libaccesstoken_sdk",
72    "cJSON:cjson",
73    "c_utils:utils",
74    "eventhandler:libeventhandler",
75    "googletest:gtest_main",
76    "ipc:ipc_core",
77    "samgr:samgr_proxy",
78    "selinux_adapter:librestorecon",
79  ]
80
81  defines = []
82  if (graphic_2d_support_access_token) {
83    external_deps += [
84      "access_token:libnativetoken",
85      "access_token:libtoken_setproc",
86    ]
87    defines += [ "SUPPORT_ACCESS_TOKEN" ]
88  }
89}
90
91## SystemTest vsync_test }}}
92
93## SystemTest vsync_ltpo_test {{{
94ohos_unittest("vsync_ltpo_test_st") {
95  module_out_path = module_out_path
96
97  sources = [ "vsync_ltpo_test.cpp" ]
98
99  include_dirs = [
100    "$graphic_2d_root/interfaces/inner_api/common",
101    "$graphic_2d_root/rosen/modules/composer/vsync/include",
102  ]
103
104  cflags = [
105    "-Wall",
106    "-Werror",
107    "-g3",
108  ]
109
110  deps = [
111    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
112    "$graphic_2d_root/rosen/modules/platform:eventhandler",
113    "$graphic_2d_root/utils:socketpair",
114  ]
115  external_deps = [
116    "access_token:libaccesstoken_sdk",
117    "cJSON:cjson",
118    "c_utils:utils",
119    "googletest:gtest_main",
120    "ipc:ipc_core",
121    "samgr:samgr_proxy",
122    "selinux_adapter:librestorecon",
123  ]
124
125  defines = []
126  if (graphic_2d_support_access_token) {
127    external_deps += [
128      "access_token:libnativetoken",
129      "access_token:libtoken_setproc",
130    ]
131    defines += [ "SUPPORT_ACCESS_TOKEN" ]
132  }
133}
134
135## SystemTest vsync_ltpo_test }}}
136
137## SystemTest vsync_30to60_test {{{
138ohos_unittest("vsync_30to60_test_st") {
139  module_out_path = module_out_path
140
141  sources = [ "vsync_30to60_test.cpp" ]
142
143  include_dirs = [
144    "$graphic_2d_root/interfaces/inner_api/common",
145    "$graphic_2d_root/rosen/modules/composer/vsync/include",
146  ]
147
148  cflags = [
149    "-Wall",
150    "-Werror",
151    "-g3",
152  ]
153
154  deps = [
155    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
156    "$graphic_2d_root/rosen/modules/platform:eventhandler",
157    "$graphic_2d_root/utils:socketpair",
158  ]
159  external_deps = [
160    "access_token:libaccesstoken_sdk",
161    "cJSON:cjson",
162    "c_utils:utils",
163    "googletest:gtest_main",
164    "ipc:ipc_core",
165    "samgr:samgr_proxy",
166    "selinux_adapter:librestorecon",
167  ]
168
169  defines = []
170  if (graphic_2d_support_access_token) {
171    external_deps += [
172      "access_token:libnativetoken",
173      "access_token:libtoken_setproc",
174    ]
175    defines += [ "SUPPORT_ACCESS_TOKEN" ]
176  }
177}
178
179## SystemTest vsync_30to60_test }}}
180
181## SystemTest vsync_30to90_test {{{
182ohos_unittest("vsync_30to90_test_st") {
183  module_out_path = module_out_path
184
185  sources = [ "vsync_30to90_test.cpp" ]
186
187  include_dirs = [
188    "$graphic_2d_root/interfaces/inner_api/common",
189    "$graphic_2d_root/rosen/modules/composer/vsync/include",
190  ]
191
192  cflags = [
193    "-Wall",
194    "-Werror",
195    "-g3",
196  ]
197
198  deps = [
199    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
200    "$graphic_2d_root/rosen/modules/platform:eventhandler",
201    "$graphic_2d_root/utils:socketpair",
202  ]
203  external_deps = [
204    "access_token:libaccesstoken_sdk",
205    "cJSON:cjson",
206    "c_utils:utils",
207    "googletest:gtest_main",
208    "ipc:ipc_core",
209    "samgr:samgr_proxy",
210    "selinux_adapter:librestorecon",
211  ]
212
213  defines = []
214  if (graphic_2d_support_access_token) {
215    external_deps += [
216      "access_token:libnativetoken",
217      "access_token:libtoken_setproc",
218    ]
219    defines += [ "SUPPORT_ACCESS_TOKEN" ]
220  }
221}
222
223## SystemTest vsync_30to90_test }}}
224
225## SystemTest vsync_30to120_test {{{
226ohos_unittest("vsync_30to120_test_st") {
227  module_out_path = module_out_path
228
229  sources = [ "vsync_30to120_test.cpp" ]
230
231  include_dirs = [
232    "$graphic_2d_root/interfaces/inner_api/common",
233    "$graphic_2d_root/rosen/modules/composer/vsync/include",
234  ]
235
236  cflags = [
237    "-Wall",
238    "-Werror",
239    "-g3",
240  ]
241
242  deps = [
243    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
244    "$graphic_2d_root/rosen/modules/platform:eventhandler",
245    "$graphic_2d_root/utils:socketpair",
246  ]
247  external_deps = [
248    "access_token:libaccesstoken_sdk",
249    "cJSON:cjson",
250    "c_utils:utils",
251    "googletest:gtest_main",
252    "ipc:ipc_core",
253    "samgr:samgr_proxy",
254    "selinux_adapter:librestorecon",
255  ]
256
257  defines = []
258  if (graphic_2d_support_access_token) {
259    external_deps += [
260      "access_token:libnativetoken",
261      "access_token:libtoken_setproc",
262    ]
263    defines += [ "SUPPORT_ACCESS_TOKEN" ]
264  }
265}
266
267## SystemTest vsync_30to120_test }}}
268
269## SystemTest vsync_60to30_test {{{
270ohos_unittest("vsync_60to30_test_st") {
271  module_out_path = module_out_path
272
273  sources = [ "vsync_60to30_test.cpp" ]
274
275  include_dirs = [
276    "$graphic_2d_root/interfaces/inner_api/common",
277    "$graphic_2d_root/rosen/modules/composer/vsync/include",
278  ]
279
280  cflags = [
281    "-Wall",
282    "-Werror",
283    "-g3",
284  ]
285
286  deps = [
287    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
288    "$graphic_2d_root/rosen/modules/platform:eventhandler",
289    "$graphic_2d_root/utils:socketpair",
290  ]
291  external_deps = [
292    "access_token:libaccesstoken_sdk",
293    "cJSON:cjson",
294    "c_utils:utils",
295    "googletest:gtest_main",
296    "ipc:ipc_core",
297    "samgr:samgr_proxy",
298    "selinux_adapter:librestorecon",
299  ]
300
301  defines = []
302  if (graphic_2d_support_access_token) {
303    external_deps += [
304      "access_token:libnativetoken",
305      "access_token:libtoken_setproc",
306    ]
307    defines += [ "SUPPORT_ACCESS_TOKEN" ]
308  }
309}
310
311## SystemTest vsync_60to30_test }}}
312
313## SystemTest vsync_60to90_test {{{
314ohos_unittest("vsync_60to90_test_st") {
315  module_out_path = module_out_path
316
317  sources = [ "vsync_60to90_test.cpp" ]
318
319  include_dirs = [
320    "$graphic_2d_root/interfaces/inner_api/common",
321    "$graphic_2d_root/rosen/modules/composer/vsync/include",
322  ]
323
324  cflags = [
325    "-Wall",
326    "-Werror",
327    "-g3",
328  ]
329
330  deps = [
331    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
332    "$graphic_2d_root/rosen/modules/platform:eventhandler",
333    "$graphic_2d_root/utils:socketpair",
334  ]
335  external_deps = [
336    "access_token:libaccesstoken_sdk",
337    "cJSON:cjson",
338    "c_utils:utils",
339    "googletest:gtest_main",
340    "ipc:ipc_core",
341    "samgr:samgr_proxy",
342    "selinux_adapter:librestorecon",
343  ]
344
345  defines = []
346  if (graphic_2d_support_access_token) {
347    external_deps += [
348      "access_token:libnativetoken",
349      "access_token:libtoken_setproc",
350    ]
351    defines += [ "SUPPORT_ACCESS_TOKEN" ]
352  }
353}
354
355## SystemTest vsync_60to90_test }}}
356
357## SystemTest vsync_60to120_test {{{
358ohos_unittest("vsync_60to120_test_st") {
359  module_out_path = module_out_path
360
361  sources = [ "vsync_60to120_test.cpp" ]
362
363  include_dirs = [
364    "$graphic_2d_root/interfaces/inner_api/common",
365    "$graphic_2d_root/rosen/modules/composer/vsync/include",
366  ]
367
368  cflags = [
369    "-Wall",
370    "-Werror",
371    "-g3",
372  ]
373
374  deps = [
375    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
376    "$graphic_2d_root/rosen/modules/platform:eventhandler",
377    "$graphic_2d_root/utils:socketpair",
378  ]
379  external_deps = [
380    "access_token:libaccesstoken_sdk",
381    "cJSON:cjson",
382    "c_utils:utils",
383    "googletest:gtest_main",
384    "ipc:ipc_core",
385    "samgr:samgr_proxy",
386    "selinux_adapter:librestorecon",
387  ]
388
389  defines = []
390  if (graphic_2d_support_access_token) {
391    external_deps += [
392      "access_token:libnativetoken",
393      "access_token:libtoken_setproc",
394    ]
395    defines += [ "SUPPORT_ACCESS_TOKEN" ]
396  }
397}
398
399## SystemTest vsync_60to120_test }}}
400
401## SystemTest vsync_90to30_test {{{
402ohos_unittest("vsync_90to30_test_st") {
403  module_out_path = module_out_path
404
405  sources = [ "vsync_90to30_test.cpp" ]
406
407  include_dirs = [
408    "$graphic_2d_root/interfaces/inner_api/common",
409    "$graphic_2d_root/rosen/modules/composer/vsync/include",
410  ]
411
412  cflags = [
413    "-Wall",
414    "-Werror",
415    "-g3",
416  ]
417
418  deps = [
419    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
420    "$graphic_2d_root/rosen/modules/platform:eventhandler",
421    "$graphic_2d_root/utils:socketpair",
422  ]
423  external_deps = [
424    "access_token:libaccesstoken_sdk",
425    "cJSON:cjson",
426    "c_utils:utils",
427    "googletest:gtest_main",
428    "ipc:ipc_core",
429    "samgr:samgr_proxy",
430    "selinux_adapter:librestorecon",
431  ]
432
433  defines = []
434  if (graphic_2d_support_access_token) {
435    external_deps += [
436      "access_token:libnativetoken",
437      "access_token:libtoken_setproc",
438    ]
439    defines += [ "SUPPORT_ACCESS_TOKEN" ]
440  }
441}
442
443## SystemTest vsync_90to30_test }}}
444
445## SystemTest vsync_90to60_test {{{
446ohos_unittest("vsync_90to60_test_st") {
447  module_out_path = module_out_path
448
449  sources = [ "vsync_90to60_test.cpp" ]
450
451  include_dirs = [
452    "$graphic_2d_root/interfaces/inner_api/common",
453    "$graphic_2d_root/rosen/modules/composer/vsync/include",
454  ]
455
456  cflags = [
457    "-Wall",
458    "-Werror",
459    "-g3",
460  ]
461
462  deps = [
463    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
464    "$graphic_2d_root/rosen/modules/platform:eventhandler",
465    "$graphic_2d_root/utils:socketpair",
466  ]
467  external_deps = [
468    "access_token:libaccesstoken_sdk",
469    "cJSON:cjson",
470    "c_utils:utils",
471    "googletest:gtest_main",
472    "ipc:ipc_core",
473    "samgr:samgr_proxy",
474    "selinux_adapter:librestorecon",
475  ]
476
477  defines = []
478  if (graphic_2d_support_access_token) {
479    external_deps += [
480      "access_token:libnativetoken",
481      "access_token:libtoken_setproc",
482    ]
483    defines += [ "SUPPORT_ACCESS_TOKEN" ]
484  }
485}
486
487## SystemTest vsync_90to60_test }}}
488
489## SystemTest vsync_90to120_test {{{
490ohos_unittest("vsync_90to120_test_st") {
491  module_out_path = module_out_path
492
493  sources = [ "vsync_90to120_test.cpp" ]
494
495  include_dirs = [
496    "$graphic_2d_root/interfaces/inner_api/common",
497    "$graphic_2d_root/rosen/modules/composer/vsync/include",
498  ]
499
500  cflags = [
501    "-Wall",
502    "-Werror",
503    "-g3",
504  ]
505
506  deps = [
507    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
508    "$graphic_2d_root/rosen/modules/platform:eventhandler",
509    "$graphic_2d_root/utils:socketpair",
510  ]
511  external_deps = [
512    "access_token:libaccesstoken_sdk",
513    "cJSON:cjson",
514    "c_utils:utils",
515    "googletest:gtest_main",
516    "ipc:ipc_core",
517    "samgr:samgr_proxy",
518    "selinux_adapter:librestorecon",
519  ]
520
521  defines = []
522  if (graphic_2d_support_access_token) {
523    external_deps += [
524      "access_token:libnativetoken",
525      "access_token:libtoken_setproc",
526    ]
527    defines += [ "SUPPORT_ACCESS_TOKEN" ]
528  }
529}
530
531## SystemTest vsync_90to120_test }}}
532
533## SystemTest vsync_120to30_test {{{
534ohos_unittest("vsync_120to30_test_st") {
535  module_out_path = module_out_path
536
537  sources = [ "vsync_120to30_test.cpp" ]
538
539  include_dirs = [
540    "$graphic_2d_root/interfaces/inner_api/common",
541    "$graphic_2d_root/rosen/modules/composer/vsync/include",
542  ]
543
544  cflags = [
545    "-Wall",
546    "-Werror",
547    "-g3",
548  ]
549
550  deps = [
551    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
552    "$graphic_2d_root/rosen/modules/platform:eventhandler",
553    "$graphic_2d_root/utils:socketpair",
554  ]
555  external_deps = [
556    "access_token:libaccesstoken_sdk",
557    "cJSON:cjson",
558    "c_utils:utils",
559    "googletest:gtest_main",
560    "ipc:ipc_core",
561    "samgr:samgr_proxy",
562    "selinux_adapter:librestorecon",
563  ]
564
565  defines = []
566  if (graphic_2d_support_access_token) {
567    external_deps += [
568      "access_token:libnativetoken",
569      "access_token:libtoken_setproc",
570    ]
571    defines += [ "SUPPORT_ACCESS_TOKEN" ]
572  }
573}
574
575## SystemTest vsync_120to30_test }}}
576
577## SystemTest vsync_120to60_test {{{
578ohos_unittest("vsync_120to60_test_st") {
579  module_out_path = module_out_path
580
581  sources = [ "vsync_120to60_test.cpp" ]
582
583  include_dirs = [
584    "$graphic_2d_root/interfaces/inner_api/common",
585    "$graphic_2d_root/rosen/modules/composer/vsync/include",
586  ]
587
588  cflags = [
589    "-Wall",
590    "-Werror",
591    "-g3",
592  ]
593
594  deps = [
595    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
596    "$graphic_2d_root/rosen/modules/platform:eventhandler",
597    "$graphic_2d_root/utils:socketpair",
598  ]
599  external_deps = [
600    "access_token:libaccesstoken_sdk",
601    "cJSON:cjson",
602    "c_utils:utils",
603    "googletest:gtest_main",
604    "ipc:ipc_core",
605    "samgr:samgr_proxy",
606    "selinux_adapter:librestorecon",
607  ]
608
609  defines = []
610  if (graphic_2d_support_access_token) {
611    external_deps += [
612      "access_token:libnativetoken",
613      "access_token:libtoken_setproc",
614    ]
615    defines += [ "SUPPORT_ACCESS_TOKEN" ]
616  }
617}
618
619## SystemTest vsync_120to60_test }}}
620
621## SystemTest vsync_120to90_test {{{
622ohos_unittest("vsync_120to90_test_st") {
623  module_out_path = module_out_path
624
625  sources = [ "vsync_120to90_test.cpp" ]
626
627  include_dirs = [
628    "$graphic_2d_root/interfaces/inner_api/common",
629    "$graphic_2d_root/rosen/modules/composer/vsync/include",
630  ]
631
632  cflags = [
633    "-Wall",
634    "-Werror",
635    "-g3",
636  ]
637
638  deps = [
639    "$graphic_2d_root/rosen/modules/composer/vsync:libvsync",
640    "$graphic_2d_root/rosen/modules/platform:eventhandler",
641    "$graphic_2d_root/utils:socketpair",
642  ]
643  external_deps = [
644    "access_token:libaccesstoken_sdk",
645    "cJSON:cjson",
646    "c_utils:utils",
647    "googletest:gtest_main",
648    "ipc:ipc_core",
649    "samgr:samgr_proxy",
650    "selinux_adapter:librestorecon",
651  ]
652
653  defines = []
654  if (graphic_2d_support_access_token) {
655    external_deps += [
656      "access_token:libnativetoken",
657      "access_token:libtoken_setproc",
658    ]
659    defines += [ "SUPPORT_ACCESS_TOKEN" ]
660  }
661}
662
663## SystemTest vsync_120to90_test }}}
664
665## SystemTest vsync_multicallback_test {{{
666ohos_unittest("vsync_multicallback_test_st") {
667  module_out_path = module_out_path
668
669  sources = [ "vsync_multicallback_test.cpp" ]
670
671  include_dirs = [
672    "$graphic_2d_root/interfaces/inner_api/common",
673    "$graphic_2d_root/rosen/modules/composer/vsync/include",
674    "$graphic_2d_root/rosen/modules/composer/vsync/test",
675  ]
676
677  cflags = [
678    "-Wall",
679    "-Werror",
680    "-g3",
681  ]
682
683  deps = [
684    "$graphic_2d_root/rosen/modules/platform:eventhandler",
685    "$graphic_2d_root/utils:socketpair",
686    "../..:libvsync",
687  ]
688  external_deps = [
689    "access_token:libaccesstoken_sdk",
690    "cJSON:cjson",
691    "c_utils:utils",
692    "googletest:gtest_main",
693    "ipc:ipc_core",
694    "samgr:samgr_proxy",
695    "selinux_adapter:librestorecon",
696  ]
697
698  defines = []
699  if (graphic_2d_support_access_token) {
700    external_deps += [
701      "access_token:libnativetoken",
702      "access_token:libtoken_setproc",
703    ]
704    defines += [ "SUPPORT_ACCESS_TOKEN" ]
705  }
706}
707
708## SystemTest vsync_multicallback_test }}}
709
710## SystemTest vsync_limit_test {{{
711ohos_unittest("vsync_limit_test_st") {
712  module_out_path = module_out_path
713
714  sources = [ "vsync_limit_test.cpp" ]
715
716  include_dirs = [ "$graphic_2d_root/interfaces/inner_api/composer" ]
717
718  cflags = [
719    "-Wall",
720    "-Werror",
721    "-g3",
722  ]
723
724  deps =
725      [ "$graphic_2d_root/rosen/modules/composer/native_vsync:libnative_vsync" ]
726}
727
728## SystemTest vsync_limit_test }}}
729
730## SystemTest nativeVsync_getPeriod_test {{{
731ohos_unittest("nativeVsync_getPeriod_test_st") {
732  module_out_path = module_out_path
733
734  sources = [ "nativeVsync_getPeriod_test.cpp" ]
735
736  include_dirs = [
737    "$graphic_2d_root/interfaces/inner_api/common",
738    "$graphic_2d_root/interfaces/inner_api/composer",
739  ]
740
741  cflags = [
742    "-Wall",
743    "-Werror",
744    "-g3",
745  ]
746
747  deps =
748      [ "$graphic_2d_root/rosen/modules/composer/native_vsync:libnative_vsync" ]
749}
750
751## SystemTest nativeVsync_getPeriod_test }}}
752
753## SystemTest nativeVsync_requestFrame_test {{{
754ohos_unittest("nativeVsync_requestFrame_test_st") {
755  module_out_path = module_out_path
756
757  sources = [ "nativeVsync_requestFrame_test.cpp" ]
758
759  include_dirs = [ "$graphic_2d_root/interfaces/inner_api/composer" ]
760
761  cflags = [
762    "-Wall",
763    "-Werror",
764    "-g3",
765  ]
766
767  deps =
768      [ "$graphic_2d_root/rosen/modules/composer/native_vsync:libnative_vsync" ]
769}
770
771## SystemTest nativeVsync_requestFrame_test }}}
772
773## SystemTest nativeVsync_requestMultiCB_test {{{
774ohos_unittest("nativeVsync_requestMultiCB_test_st") {
775  module_out_path = module_out_path
776
777  sources = [ "nativeVsync_requestMultiCB_test.cpp" ]
778
779  include_dirs = [ "$graphic_2d_root/interfaces/inner_api/composer" ]
780
781  cflags = [
782    "-Wall",
783    "-Werror",
784    "-g3",
785  ]
786
787  deps =
788      [ "$graphic_2d_root/rosen/modules/composer/native_vsync:libnative_vsync" ]
789}
790
791## SystemTest nativeVsync_requestMultiCB_test }}}
792
793## SystemTest vsync_setvsyncrate_test {{{
794ohos_unittest("vsync_setvsyncrate_test_st") {
795  module_out_path = module_out_path
796
797  sources = [ "vsync_setvsyncrate_test.cpp" ]
798
799  include_dirs = [
800    "$graphic_2d_root/interfaces/inner_api/common",
801    "$graphic_2d_root/rosen/modules/composer/vsync/include",
802    "$graphic_2d_root/rosen/modules/composer/vsync/test",
803  ]
804
805  cflags = [
806    "-Wall",
807    "-Werror",
808    "-g3",
809  ]
810
811  deps = [
812    "$graphic_2d_root/utils:socketpair",
813    "../..:libvsync",
814  ]
815  external_deps = [
816    "access_token:libaccesstoken_sdk",
817    "cJSON:cjson",
818    "c_utils:utils",
819    "eventhandler:libeventhandler",
820    "googletest:gtest_main",
821    "ipc:ipc_core",
822    "samgr:samgr_proxy",
823    "selinux_adapter:librestorecon",
824  ]
825
826  defines = []
827  if (graphic_2d_support_access_token) {
828    external_deps += [
829      "access_token:libnativetoken",
830      "access_token:libtoken_setproc",
831    ]
832    defines += [ "SUPPORT_ACCESS_TOKEN" ]
833  }
834}
835
836## SystemTest vsync_setvsyncrate_test }}}
837
838## SystemTest vsync_callbackeveryframe_test {{{
839ohos_unittest("vsync_callbackeveryframe_test_st") {
840  module_out_path = module_out_path
841
842  sources = [ "vsync_callbackeveryframe_test.cpp" ]
843
844  include_dirs = [
845    "$graphic_2d_root/interfaces/inner_api/common",
846    "$graphic_2d_root/rosen/modules/composer/vsync/include",
847    "$graphic_2d_root/rosen/modules/composer/vsync/test",
848  ]
849
850  cflags = [
851    "-Wall",
852    "-Werror",
853    "-g3",
854  ]
855
856  deps = [
857    "$graphic_2d_root/rosen/modules/platform:eventhandler",
858    "$graphic_2d_root/utils:socketpair",
859    "../..:libvsync",
860  ]
861  external_deps = [
862    "access_token:libaccesstoken_sdk",
863    "cJSON:cjson",
864    "c_utils:utils",
865    "googletest:gtest_main",
866    "ipc:ipc_core",
867    "samgr:samgr_proxy",
868    "selinux_adapter:librestorecon",
869  ]
870
871  defines = []
872  if (graphic_2d_support_access_token) {
873    external_deps += [
874      "access_token:libnativetoken",
875      "access_token:libtoken_setproc",
876    ]
877    defines += [ "SUPPORT_ACCESS_TOKEN" ]
878  }
879}
880
881## SystemTest vsync_callbackeveryframe_test }}}
882
883## SystemTest vsync_sample_test {{{
884ohos_unittest("vsync_sample_test_st") {
885  module_out_path = module_out_path
886
887  sources = [ "vsync_sample_test.cpp" ]
888
889  include_dirs = [
890    "$graphic_2d_root/interfaces/inner_api/common",
891    "$graphic_2d_root/rosen/modules/composer/vsync/include",
892    "$graphic_2d_root/rosen/modules/composer/vsync/test",
893  ]
894
895  cflags = [
896    "-Wall",
897    "-Werror",
898    "-g3",
899  ]
900
901  deps = [
902    "$graphic_2d_root/utils:socketpair",
903    "../..:libvsync",
904  ]
905  external_deps = [
906    "access_token:libaccesstoken_sdk",
907    "cJSON:cjson",
908    "c_utils:utils",
909    "googletest:gtest_main",
910    "ipc:ipc_core",
911    "samgr:samgr_proxy",
912    "selinux_adapter:librestorecon",
913  ]
914
915  defines = []
916  if (graphic_2d_support_access_token) {
917    external_deps += [
918      "access_token:libnativetoken",
919      "access_token:libtoken_setproc",
920    ]
921    defines += [ "SUPPORT_ACCESS_TOKEN" ]
922  }
923}
924## SystemTest vsync_sample_test }}}
925