1686862fbSopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
2686862fbSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3686862fbSopenharmony_ci# you may not use this file except in compliance with the License.
4686862fbSopenharmony_ci# You may obtain a copy of the License at
5686862fbSopenharmony_ci#
6686862fbSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7686862fbSopenharmony_ci#
8686862fbSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9686862fbSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10686862fbSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11686862fbSopenharmony_ci# See the License for the specific language governing permissions and
12686862fbSopenharmony_ci# limitations under the License.
13686862fbSopenharmony_ci
14686862fbSopenharmony_ci#####################hydra-fuzz###################
15686862fbSopenharmony_ciimport("//build/test.gni")
16686862fbSopenharmony_ciimport("//foundation/ability/dmsfwk/dmsfwk.gni")
17686862fbSopenharmony_ciohos_fuzztest("DistributedWantParamsFuzzTest") {
18686862fbSopenharmony_ci  module_out_path = module_output_path
19686862fbSopenharmony_ci
20686862fbSopenharmony_ci  fuzz_config_file = "${dms_path}/test/fuzztest/distributedwantparams_fuzzer"
21686862fbSopenharmony_ci  include_dirs = [
22686862fbSopenharmony_ci    "${dms_path}/services/dtbschedmgr/include",
23686862fbSopenharmony_ci    "${dms_path}/services/dtbschedmgr/include/distributedWant",
24686862fbSopenharmony_ci  ]
25686862fbSopenharmony_ci  cflags = [
26686862fbSopenharmony_ci    "-g",
27686862fbSopenharmony_ci    "-O0",
28686862fbSopenharmony_ci    "-Wno-unused-variable",
29686862fbSopenharmony_ci    "-fno-omit-frame-pointer",
30686862fbSopenharmony_ci    "-Dprivate=public",
31686862fbSopenharmony_ci  ]
32686862fbSopenharmony_ci  sources = [ "distributedwantparams_fuzzer.cpp" ]
33686862fbSopenharmony_ci
34686862fbSopenharmony_ci  configs = [ "${dms_path}/services/dtbschedmgr/test/resource:coverage_flags" ]
35686862fbSopenharmony_ci
36686862fbSopenharmony_ci  deps = [ "${dms_path}/services/dtbschedmgr:distributedschedsvr" ]
37686862fbSopenharmony_ci
38686862fbSopenharmony_ci  external_deps = [
39686862fbSopenharmony_ci    "ability_base:base",
40686862fbSopenharmony_ci    "ability_base:want",
41686862fbSopenharmony_ci    "ability_base:zuri",
42686862fbSopenharmony_ci    "c_utils:utils",
43686862fbSopenharmony_ci  ]
44686862fbSopenharmony_ci}
45686862fbSopenharmony_ci
46686862fbSopenharmony_cigroup("fuzztest") {
47686862fbSopenharmony_ci  testonly = true
48686862fbSopenharmony_ci  deps = [ ":DistributedWantParamsFuzzTest" ]
49686862fbSopenharmony_ci}
50