• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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("//base/inputmethod/imf/inputmethod.gni")
15
16#####################hydra-fuzz###################
17import("//build/config/features.gni")
18import("//build/ohos.gni")
19import("//build/test.gni")
20group("system_ability_stub_fuzztest") {
21  testonly = true
22  deps = [
23    ":BindImeMirrorFuzzTest",
24    ":CommandEnableImeFuzzTest",
25    ":CommandGetInputMethodStateFuzzTest",
26    ":CommandGetInputStartInfoFuzzTest",
27    ":CommandHideCurrentInputDeprecatedFuzzTest",
28    ":CommandInitConnectFuzzTest",
29    ":CommandIsCurrentImeByPidFuzzTest",
30    ":CommandIsDefaultImeSetFuzzTest",
31    ":CommandIsSystemAppSetFuzzTest",
32    ":CommandRegisterProxyImeFuzzTest",
33    ":CommandSetCallingWindowFuzzTest",
34    ":CommandUnregisterProxyImeFuzzTest",
35    ":ConnectSystemCmdFuzzTest",
36    ":DisplayOptionalInputMethodFuzzTest",
37    ":ExitCurrentInputTypeFuzzTest",
38    ":GetCurrentInputmethodFuzzTest",
39    ":GetCurrentInputmethodSubtypeFuzzTest",
40    ":GetDefaultInputmethodFuzzTest",
41    ":GetInputMethodConfigFuzzTest",
42    ":GetSecurityModeFuzzTest",
43    ":HideCurrentInputDeprecatedFuzzTest",
44    ":HideCurrentInputFuzzTest",
45    ":HideInputFuzzTest",
46    ":IsCurrentImeFuzzTest",
47    ":IsDefaultImeFuzzTest",
48    ":IsInputTypeSupportedFuzzTest",
49    ":IsPanelShownFuzzTest",
50    ":ListCurrentInputmethodSubtypeFuzzTest",
51    ":ListInputmethodFuzzTest",
52    ":ListInputmethodSubtypeFuzzTest",
53    ":PanelStatusChangeFuzzTest",
54    ":ReleaseInputFuzzTest",
55    ":RequestHideInputFuzzTest",
56    ":RequestShowInputFuzzTest",
57    ":SetCoreAndAgentFuzzTest",
58    ":ShowCurrentInputDeprecatedFuzzTest",
59    ":ShowCurrentInputFuzzTest",
60    ":ShowInputFuzzTest",
61    ":StartInputFuzzTest",
62    ":StartInputTypeFuzzTest",
63    ":StopInputSessionFuzzTest",
64    ":SwitchInputMethodFuzzTest",
65    ":UnRegisteredProxyImeFuzzTest",
66    ":UpdateListenEventFlagFuzzTest",
67  ]
68}
69
70common_external_deps = [
71  "ability_runtime:ability_manager",
72  "access_token:libaccesstoken_sdk",
73  "bundle_framework:appexecfwk_core",
74  "cJSON:cjson",
75  "data_share:datashare_common",
76  "data_share:datashare_consumer",
77  "graphic_2d:librender_service_base",
78  "hilog:libhilog",
79  "input:libmmi-client",
80  "safwk:system_ability_fwk",
81  "window_manager:libdm_lite",
82]
83
84if (build_selinux) {
85  common_external_deps += [ "selinux_adapter:librestorecon" ]
86}
87
88common_deps = [
89  "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:inputmethod_ability_fuzz_static",
90  "${inputmethod_path}/services:inputmethod_service_static",
91  "${inputmethod_path}/services/adapter/settings_data_provider:settings_data_static",
92  "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common:imf_sa_stub_fuzztest_common_static",
93]
94
95##############################fuzztest##########################################
96ohos_fuzztest("GetCurrentInputmethodFuzzTest") {
97  module_out_path = "imf/imf"
98
99  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getcurrentinputmethod_fuzzer"
100
101  sources = [ "getcurrentinputmethod_fuzzer/getcurrentinputmethod_fuzzer.cpp" ]
102
103  include_dirs = [
104    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getcurrentinputmethod_fuzzer",
105    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
106  ]
107
108  deps = common_deps
109
110  external_deps = common_external_deps
111}
112
113ohos_fuzztest("GetCurrentInputmethodSubtypeFuzzTest") {
114  module_out_path = "imf/imf"
115
116  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getcurrentinputmethodsubtype_fuzzer"
117
118  include_dirs = [
119    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getcurrentinputmethodsubtype_fuzzer",
120    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
121  ]
122
123  sources = [ "getcurrentinputmethodsubtype_fuzzer/getcurrentinputmethodsubtype_fuzzer.cpp" ]
124
125  deps = common_deps
126
127  external_deps = common_external_deps
128}
129
130ohos_fuzztest("HideCurrentInputFuzzTest") {
131  module_out_path = "imf/imf"
132
133  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/hidecurrentinput_fuzzer"
134
135  include_dirs = [
136    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/hidecurrentinput_fuzzer",
137    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
138  ]
139
140  sources = [ "hidecurrentinput_fuzzer/hidecurrentinput_fuzzer.cpp" ]
141
142  deps = common_deps
143
144  external_deps = common_external_deps
145}
146
147ohos_fuzztest("HideCurrentInputDeprecatedFuzzTest") {
148  module_out_path = "imf/imf"
149
150  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/hidecurrentinputdeprecated_fuzzer"
151
152  include_dirs = [
153    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/hidecurrentinputdeprecated_fuzzer",
154    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
155  ]
156
157  sources = [
158    "hidecurrentinputdeprecated_fuzzer/hidecurrentinputdeprecated_fuzzer.cpp",
159  ]
160
161  deps = common_deps
162
163  external_deps = common_external_deps
164}
165
166ohos_fuzztest("ListCurrentInputmethodSubtypeFuzzTest") {
167  module_out_path = "imf/imf"
168
169  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/listcurrentinputmethodsubtype_fuzzer"
170
171  include_dirs = [
172    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/listcurrentinputmethodsubtype_fuzzer",
173    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
174  ]
175
176  sources = [ "listcurrentinputmethodsubtype_fuzzer/listcurrentinputmethodsubtype_fuzzer.cpp" ]
177
178  deps = common_deps
179
180  external_deps = common_external_deps
181}
182
183ohos_fuzztest("ListInputmethodFuzzTest") {
184  module_out_path = "imf/imf"
185
186  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/listinputmethod_fuzzer"
187
188  include_dirs = [
189    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/listinputmethod_fuzzer",
190    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
191  ]
192
193  sources = [ "listinputmethod_fuzzer/listinputmethod_fuzzer.cpp" ]
194
195  deps = common_deps
196
197  external_deps = common_external_deps
198}
199
200ohos_fuzztest("ListInputmethodSubtypeFuzzTest") {
201  module_out_path = "imf/imf"
202
203  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/listinputmethodsubtype_fuzzer"
204
205  include_dirs = [
206    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/listinputmethodsubtype_fuzzer",
207    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
208  ]
209
210  sources =
211      [ "listinputmethodsubtype_fuzzer/listinputmethodsubtype_fuzzer.cpp" ]
212
213  deps = common_deps
214
215  external_deps = common_external_deps
216}
217
218ohos_fuzztest("PanelStatusChangeFuzzTest") {
219  module_out_path = "imf/imf"
220
221  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/panelstatuschange_fuzzer"
222
223  include_dirs = [
224    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/panelstatuschange_fuzzer",
225    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
226  ]
227
228  sources = [ "panelstatuschange_fuzzer/panelstatuschange_fuzzer.cpp" ]
229
230  deps = common_deps
231
232  external_deps = common_external_deps
233}
234
235ohos_fuzztest("ReleaseInputFuzzTest") {
236  module_out_path = "imf/imf"
237
238  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/releaseinput_fuzzer"
239
240  include_dirs = [
241    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/releaseinput_fuzzer",
242    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
243  ]
244
245  sources = [ "releaseinput_fuzzer/releaseinput_fuzzer.cpp" ]
246
247  deps = common_deps
248
249  external_deps = common_external_deps
250}
251
252ohos_fuzztest("SetCoreAndAgentFuzzTest") {
253  module_out_path = "imf/imf"
254
255  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/setcoreandagent_fuzzer"
256
257  include_dirs = [
258    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/setcoreandagent_fuzzer",
259    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
260  ]
261
262  sources = [ "setcoreandagent_fuzzer/setcoreandagent_fuzzer.cpp" ]
263
264  deps = common_deps
265
266  external_deps = common_external_deps
267}
268
269ohos_fuzztest("ShowCurrentInputFuzzTest") {
270  module_out_path = "imf/imf"
271
272  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/showcurrentinput_fuzzer"
273
274  include_dirs = [
275    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/showcurrentinput_fuzzer",
276    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
277  ]
278
279  sources = [ "showcurrentinput_fuzzer/showcurrentinput_fuzzer.cpp" ]
280
281  deps = common_deps
282
283  external_deps = common_external_deps
284}
285
286ohos_fuzztest("ShowCurrentInputDeprecatedFuzzTest") {
287  module_out_path = "imf/imf"
288
289  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/showcurrentinputdeprecated_fuzzer"
290
291  include_dirs = [
292    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/showcurrentinputdeprecated_fuzzer",
293    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
294  ]
295
296  sources = [
297    "showcurrentinputdeprecated_fuzzer/showcurrentinputdeprecated_fuzzer.cpp",
298  ]
299
300  deps = common_deps
301
302  external_deps = common_external_deps
303}
304
305ohos_fuzztest("StartInputFuzzTest") {
306  module_out_path = "imf/imf"
307
308  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/startinput_fuzzer"
309
310  include_dirs = [
311    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/startinput_fuzzer",
312    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
313  ]
314
315  sources = [ "startinput_fuzzer/startinput_fuzzer.cpp" ]
316
317  deps = common_deps
318
319  external_deps = common_external_deps
320}
321
322ohos_fuzztest("ImsCmdLastFuzzTest") {
323  module_out_path = "imf/imf"
324
325  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/imscmdlast_fuzzer"
326
327  include_dirs = [
328    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/imscmdlast_fuzzer",
329    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
330  ]
331
332  sources = [ "imscmdlast_fuzzer/imscmdlast_fuzzer.cpp" ]
333
334  deps = common_deps
335
336  external_deps = common_external_deps
337}
338
339ohos_fuzztest("StopInputSessionFuzzTest") {
340  module_out_path = "imf/imf"
341
342  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/stopinputsession_fuzzer"
343
344  include_dirs = [
345    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/stopinputsession_fuzzer",
346    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
347  ]
348
349  sources = [ "stopinputsession_fuzzer/stopinputsession_fuzzer.cpp" ]
350
351  deps = common_deps
352
353  external_deps = common_external_deps
354}
355
356ohos_fuzztest("UpdateListenEventFlagFuzzTest") {
357  module_out_path = "imf/imf"
358
359  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/updatelisteneventflag_fuzzer"
360
361  include_dirs = [
362    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/updatelisteneventflag_fuzzer",
363    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
364  ]
365
366  sources = [ "updatelisteneventflag_fuzzer/updatelisteneventflag_fuzzer.cpp" ]
367
368  deps = common_deps
369
370  external_deps = common_external_deps
371}
372
373ohos_fuzztest("SwitchInputMethodFuzzTest") {
374  module_out_path = "imf/imf"
375
376  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/switchinputmethod_fuzzer"
377
378  include_dirs = [
379    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/switchinputmethod_fuzzer",
380    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
381  ]
382
383  sources = [ "switchinputmethod_fuzzer/switchinputmethod_fuzzer.cpp" ]
384
385  deps = common_deps
386
387  external_deps = common_external_deps
388}
389
390ohos_fuzztest("DisplayOptionalInputMethodFuzzTest") {
391  module_out_path = "imf/imf"
392
393  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/displayoptionalinputmethod_fuzzer"
394
395  include_dirs = [
396    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/displayoptionalinputmethod_fuzzer",
397    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
398  ]
399
400  sources = [
401    "displayoptionalinputmethod_fuzzer/displayoptionalinputmethod_fuzzer.cpp",
402  ]
403
404  deps = common_deps
405
406  external_deps = common_external_deps
407}
408
409ohos_fuzztest("ExitCurrentInputTypeFuzzTest") {
410  module_out_path = "imf/imf"
411
412  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/exitcurrentinputtype_fuzzer"
413
414  include_dirs = [
415    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/exitcurrentinputtype_fuzzer",
416    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
417  ]
418
419  sources = [ "exitcurrentinputtype_fuzzer/exitcurrentinputtype_fuzzer.cpp" ]
420
421  deps = common_deps
422
423  external_deps = common_external_deps
424}
425
426ohos_fuzztest("IsCurrentImeFuzzTest") {
427  module_out_path = "imf/imf"
428
429  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/iscurrentime_fuzzer"
430
431  include_dirs = [
432    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/iscurrentime_fuzzer",
433    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
434  ]
435
436  sources = [ "iscurrentime_fuzzer/iscurrentime_fuzzer.cpp" ]
437
438  deps = common_deps
439
440  external_deps = common_external_deps
441}
442
443ohos_fuzztest("IsInputTypeSupportedFuzzTest") {
444  module_out_path = "imf/imf"
445
446  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/isinputtypesupported_fuzzer"
447
448  include_dirs = [
449    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/isinputtypesupported_fuzzer",
450    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
451  ]
452
453  sources = [ "isinputtypesupported_fuzzer/isinputtypesupported_fuzzer.cpp" ]
454
455  deps = common_deps
456
457  external_deps = common_external_deps
458}
459
460ohos_fuzztest("IsPanelShownFuzzTest") {
461  module_out_path = "imf/imf"
462
463  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/ispanelshown_fuzzer"
464
465  include_dirs = [
466    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/ispanelshown_fuzzer",
467    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
468  ]
469
470  sources = [ "ispanelshown_fuzzer/ispanelshown_fuzzer.cpp" ]
471
472  deps = common_deps
473
474  external_deps = common_external_deps
475}
476
477ohos_fuzztest("UnRegisteredProxyImeFuzzTest") {
478  module_out_path = "imf/imf"
479
480  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/unregisteredproxyime_fuzzer"
481
482  include_dirs = [
483    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/unregisteredproxyime_fuzzer",
484    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
485  ]
486
487  sources = [ "unregisteredproxyime_fuzzer/unregisteredproxyime_fuzzer.cpp" ]
488
489  deps = common_deps
490
491  external_deps = common_external_deps
492}
493
494ohos_fuzztest("StartInputTypeFuzzTest") {
495  module_out_path = "imf/imf"
496
497  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/startinputtype_fuzzer"
498
499  include_dirs = [
500    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/startinputtype_fuzzer",
501    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
502  ]
503
504  sources = [ "startinputtype_fuzzer/startinputtype_fuzzer.cpp" ]
505
506  deps = common_deps
507
508  external_deps = common_external_deps
509}
510
511ohos_fuzztest("GetDefaultInputmethodFuzzTest") {
512  module_out_path = "imf/imf"
513
514  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getdefaultinputmethod_fuzzer"
515
516  include_dirs = [
517    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getdefaultinputmethod_fuzzer",
518    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
519  ]
520
521  sources = [ "getdefaultinputmethod_fuzzer/getdefaultinputmethod_fuzzer.cpp" ]
522
523  deps = common_deps
524
525  external_deps = common_external_deps
526}
527
528ohos_fuzztest("GetInputMethodConfigFuzzTest") {
529  module_out_path = "imf/imf"
530
531  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getinputmethodconfig_fuzzer"
532
533  include_dirs = [
534    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getinputmethodconfig_fuzzer",
535    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
536  ]
537
538  sources = [ "getinputmethodconfig_fuzzer/getinputmethodconfig_fuzzer.cpp" ]
539
540  deps = common_deps
541
542  external_deps = common_external_deps
543}
544
545ohos_fuzztest("HideInputFuzzTest") {
546  module_out_path = "imf/imf"
547
548  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/hideinput_fuzzer"
549
550  include_dirs = [
551    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/hideinput_fuzzer",
552    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
553  ]
554
555  sources = [ "hideinput_fuzzer/hideinput_fuzzer.cpp" ]
556
557  deps = common_deps
558
559  external_deps = common_external_deps
560}
561
562ohos_fuzztest("ShowInputFuzzTest") {
563  module_out_path = "imf/imf"
564
565  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/showinput_fuzzer"
566
567  include_dirs = [
568    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/showinput_fuzzer",
569    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
570  ]
571
572  sources = [ "showinput_fuzzer/showinput_fuzzer.cpp" ]
573
574  deps = common_deps
575
576  external_deps = common_external_deps
577}
578
579ohos_fuzztest("RequestShowInputFuzzTest") {
580  module_out_path = "imf/imf"
581
582  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/requestshowinput_fuzzer"
583
584  include_dirs = [
585    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/requestshowinput_fuzzer",
586    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
587  ]
588
589  sources = [ "requestshowinput_fuzzer/requestshowinput_fuzzer.cpp" ]
590
591  deps = common_deps
592
593  external_deps = common_external_deps
594}
595
596ohos_fuzztest("RequestHideInputFuzzTest") {
597  module_out_path = "imf/imf"
598
599  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/requesthideinput_fuzzer"
600
601  include_dirs = [
602    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/requesthideinput_fuzzer",
603    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
604  ]
605
606  sources = [ "requesthideinput_fuzzer/requesthideinput_fuzzer.cpp" ]
607
608  deps = common_deps
609
610  external_deps = common_external_deps
611}
612
613ohos_fuzztest("GetSecurityModeFuzzTest") {
614  module_out_path = "imf/imf"
615
616  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getsecuritymode_fuzzer"
617
618  include_dirs = [
619    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/getsecuritymode_fuzzer",
620    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
621  ]
622
623  sources = [ "getsecuritymode_fuzzer/getsecuritymode_fuzzer.cpp" ]
624
625  deps = common_deps
626
627  external_deps = common_external_deps
628}
629
630ohos_fuzztest("IsDefaultImeFuzzTest") {
631  module_out_path = "imf/imf"
632
633  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/isdefaultime_fuzzer"
634
635  include_dirs = [
636    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/isdefaultime_fuzzer",
637    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
638  ]
639
640  sources = [ "isdefaultime_fuzzer/isdefaultime_fuzzer.cpp" ]
641
642  deps = common_deps
643
644  external_deps = common_external_deps
645}
646
647ohos_fuzztest("ConnectSystemCmdFuzzTest") {
648  module_out_path = "imf/imf"
649
650  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/connectsystemcmd_fuzzer"
651
652  include_dirs = [
653    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/connectsystemcmd_fuzzer",
654    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
655  ]
656
657  sources = [ "connectsystemcmd_fuzzer/connectsystemcmd_fuzzer.cpp" ]
658
659  deps = common_deps
660
661  external_deps = common_external_deps
662}
663
664ohos_fuzztest("CommandIsCurrentImeByPidFuzzTest") {
665  module_out_path = "imf/imf"
666
667  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer"
668
669  include_dirs = [
670    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer",
671    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
672  ]
673
674  sources =
675      [ "commandiscurrentimebypid_fuzzer/commandiscurrentimebypid_fuzzer.cpp" ]
676
677  deps = common_deps
678
679  external_deps = common_external_deps
680}
681
682ohos_fuzztest("CommandIsDefaultImeSetFuzzTest") {
683  module_out_path = "imf/imf"
684
685  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer"
686
687  include_dirs = [
688    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer",
689    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
690  ]
691
692  sources =
693      [ "commandisdefaultimeset_fuzzer/commandisdefaultimeset_fuzzer.cpp" ]
694
695  deps = common_deps
696
697  external_deps = common_external_deps
698}
699
700ohos_fuzztest("CommandIsSystemAppSetFuzzTest") {
701  module_out_path = "imf/imf"
702
703  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer"
704
705  include_dirs = [
706    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer",
707    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
708  ]
709
710  sources = [ "commandissystemappset_fuzzer/commandissystemappset_fuzzer.cpp" ]
711
712  deps = common_deps
713
714  external_deps = common_external_deps
715}
716
717ohos_fuzztest("CommandGetInputMethodStateFuzzTest") {
718  module_out_path = "imf/imf"
719
720  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer"
721
722  include_dirs = [
723    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer",
724    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
725  ]
726
727  sources = [
728    "commandgetinputmethodstate_fuzzer/commandgetinputmethodstate_fuzzer.cpp",
729  ]
730
731  deps = common_deps
732
733  external_deps = common_external_deps
734}
735
736ohos_fuzztest("CommandHideCurrentInputDeprecatedFuzzTest") {
737  module_out_path = "imf/imf"
738
739  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer"
740
741  include_dirs = [
742    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer",
743    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
744  ]
745
746  sources = [ "commandhidecurrentinputdeprecated_fuzzer/commandhidecurrentinputdeprecated_fuzzer.cpp" ]
747
748  deps = common_deps
749
750  external_deps = common_external_deps
751}
752
753ohos_fuzztest("CommandInitConnectFuzzTest") {
754  module_out_path = "imf/imf"
755
756  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer"
757
758  include_dirs = [
759    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer",
760    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
761  ]
762
763  sources = [ "commandinitconnect_fuzzer/commandinitconnect_fuzzer.cpp" ]
764
765  deps = common_deps
766
767  external_deps = common_external_deps
768}
769
770ohos_fuzztest("CommandSetCallingWindowFuzzTest") {
771  module_out_path = "imf/imf"
772
773  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer"
774
775  include_dirs = [
776    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer",
777    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
778  ]
779
780  sources =
781      [ "commandsetcallingwindow_fuzzer/commandsetcallingwindow_fuzzer.cpp" ]
782
783  deps = common_deps
784
785  external_deps = common_external_deps
786}
787
788ohos_fuzztest("CommandGetInputStartInfoFuzzTest") {
789  module_out_path = "imf/imf"
790
791  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer"
792
793  include_dirs = [
794    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer",
795    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
796  ]
797
798  sources =
799      [ "commandgetinputstartinfo_fuzzer/commandgetinputstartinfo_fuzzer.cpp" ]
800
801  deps = common_deps
802
803  external_deps = common_external_deps
804}
805
806ohos_fuzztest("CommandRegisterProxyImeFuzzTest") {
807  module_out_path = "imf/imf"
808
809  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer"
810
811  include_dirs = [
812    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer",
813    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
814  ]
815
816  sources =
817      [ "commandregisterproxyime_fuzzer/commandregisterproxyime_fuzzer.cpp" ]
818
819  deps = common_deps
820
821  external_deps = common_external_deps
822}
823
824ohos_fuzztest("CommandUnregisterProxyImeFuzzTest") {
825  module_out_path = "imf/imf"
826
827  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer"
828
829  include_dirs = [
830    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer",
831    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
832  ]
833
834  sources = [
835    "commandunregisterproxyime_fuzzer/commandunregisterproxyime_fuzzer.cpp",
836  ]
837
838  deps = common_deps
839
840  external_deps = common_external_deps
841}
842
843ohos_fuzztest("CommandEnableImeFuzzTest") {
844  module_out_path = "imf/imf"
845
846  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer"
847
848  include_dirs = [
849    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer",
850    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
851  ]
852
853  sources = [ "commandenableime_fuzzer/commandenableime_fuzzer.cpp" ]
854
855  deps = common_deps
856
857  external_deps = common_external_deps
858}
859
860ohos_fuzztest("BindImeMirrorFuzzTest") {
861  module_out_path = "imf/imf"
862
863  fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/bindimemirror_fuzzer"
864
865  include_dirs = [
866    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/bindimemirror_fuzzer",
867    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common",
868  ]
869
870  sources = [
871    "bindimemirror_fuzzer/bindimemirror_fuzzer.cpp",
872    "${inputmethod_path}/services/src/sys_cfg_parser.cpp",
873  ]
874
875  deps = common_deps
876
877  external_deps = common_external_deps
878
879  external_deps += [
880    "access_token:libtoken_setproc",
881    "config_policy:configpolicy_util",
882  ]
883}
884