1# Copyright (c) 2022-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("//build/config/features.gni")
15import("//build/test.gni")
16import("../../../device_status.gni")
17
18module_output_path = "${device_status_fuzz_output_path}"
19
20deps_ex = [
21  "ability_runtime:app_manager",
22  "ability_base:base",
23  "ability_base:want",
24  "bundle_framework:appexecfwk_base",
25  "eventhandler:libeventhandler",
26  "ipc:ipc_single",
27  "hilog:libhilog",
28  "safwk:system_ability_fwk",
29  "samgr:samgr_proxy",
30  "c_utils:utils",
31]
32
33ohos_fuzztest("DeviceStatusAgentFuzzTest") {
34  module_out_path = module_output_path
35  fuzz_config_file = "../devicestatusagent_fuzzer"
36
37  include_dirs = [
38    "./",
39    "${device_status_interfaces_path}/innerkits/include",
40  ]
41
42  cflags = [
43    "-g",
44    "-O0",
45    "-Wno-unused-variable",
46    "-fno-omit-frame-pointer",
47  ]
48  sources = [ "./devicestatusagent_fuzzer.cpp" ]
49  deps = [
50    "${device_status_frameworks_path}/native/src:deviceagent",
51    "${device_status_interfaces_path}/innerkits:devicestatus_client",
52  ]
53
54  external_deps = deps_ex
55}
56
57group("fuzztest") {
58  testonly = true
59  deps = []
60
61  deps += [ ":DeviceStatusAgentFuzzTest" ]
62}
63