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("//build/test.gni")
15import("../../../batterystats.gni")
16
17module_output_path = "battery_statistics/battery_statistics"
18
19##############################fuzztest##########################################
20ohos_fuzztest("ResetDumpFuzzTest") {
21  module_out_path = module_output_path
22  fuzz_config_file = "${batterystats_root_path}/test/fuzztest/resetdump_fuzzer"
23
24  include_dirs = [
25    "./",
26    "${batterystats_utils_path}:batterystats_utils_config",
27    "${batterystats_utils_path}/native/include",
28    "../stats_utils",
29  ]
30
31  configs = [ "${batterystats_utils_path}:coverage_flags" ]
32
33  cflags = [
34    "-g",
35    "-O0",
36    "-Wno-unused-variable",
37    "-fno-omit-frame-pointer",
38  ]
39  sources = [
40    "../stats_utils/batterystats_fuzzer.cpp",
41    "./resetdump_fuzzer_test.cpp",
42  ]
43  deps = [
44    "${batterystats_service_path}:batterystats_service",
45    "${batterystats_service_path}:batterystats_stub",
46    "${batterystats_utils_path}:batterystats_utils",
47  ]
48
49  external_deps = [
50    "c_utils:utils",
51    "hilog:libhilog",
52    "hisysevent:libhisyseventmanager",
53    "ipc:ipc_core",
54    "safwk:system_ability_fwk",
55  ]
56}
57