1# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.
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
14#####################hydra-fuzz###################
15import("//build/test.gni")
16import("../../../../../base/config.gni")
17
18##############################fuzztest##########################################
19ohos_fuzztest("ProfilerStopSessionFuzzTest") {
20  module_out_path = hiprofiler_fuzz_output_path
21  fuzz_config_file = "${OHOS_PROFILER_DIR}/device/services/profiler_service/test/fuzztest/profilerstopsession_fuzzer"
22  include_dirs = [
23    "../../../include",
24    "../../../../plugin_service/include",
25    "${OHOS_PROFILER_DIR}/interfaces/kits",
26  ]
27  cflags = [
28    "-g",
29    "-O0",
30    "-Wno-unused-variable",
31    "-fno-omit-frame-pointer",
32  ]
33  sources = [ "profilerstopsession_fuzzer.cpp" ]
34  deps = [
35    "${OHOS_PROFILER_DIR}/protos/services:proto_services_cpp",
36    "../../..:profiler_service",
37    "../../../../plugin_service:hiprofiler_plugin_service",
38  ]
39  external_deps = [
40    "abseil-cpp:absl_sync",
41    "bounds_checking_function:libsec_shared",
42    "grpc:grpc",
43    "grpc:grpcxx",
44    "hilog:libhilog_base",
45    "openssl:libcrypto_shared",
46    "protobuf:protobuf_lite",
47  ]
48}
49
50###############################################################################
51group("fuzztest") {
52  testonly = true
53  deps = []
54  deps += [
55    # deps file
56    ":ProfilerStopSessionFuzzTest",
57  ]
58}
59###############################################################################
60