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