# Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #####################hydra-fuzz################### import("//build/ohos.gni") import("../../../build/test.gni") import("../../test_ts.gni") ##############################fuzztest########################################## ohos_fuzztest("ts_htrace_fuzz_test") { include_dirs = [ "../../../src/proto_reader/include", "../../../src", "../../../src/base", "../../../src/table", "../../../src/filter", "../../../src/trace_data", "../../../src/parser", "../../../src/trace_streamer", "../../../src/include", "../../../src/parser/ptreader_parser", "../../../src/cfg", "../../../src/metrics", "${THIRD_PARTY}/sqlite/include", "${THIRD_PARTY}/protobuf/src", "${THIRD_PARTY}/bounds_checking_function/include", "${THIRD_PARTY}/json/single_include/nlohmann", ] include_dirs += [ "${TRACE_STDTYPE}", "${TRACE_STDTYPE}/ftrace", "${TRACE_STDTYPE}/ftrace/template", "${TRACE_STDTYPE}/hilog", "${TRACE_STDTYPE}/hiperf", "${TRACE_STDTYPE}/hisysevent", "${TRACE_STDTYPE}/htrace", "${TRACE_STDTYPE}/measure", ] cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] sources = [ "htrace_fuzzer.cpp" ] ldflags = [ "-fprofile-arcs", "-ftest-coverage", "--coverage", ] deps = [ "${THIRD_PARTY}/protobuf:protobuf_lite_static", "${THIRD_PARTY}/protobuf:protobuf_static", "../../../src:trace_streamer_source", "../../../src/proto_reader:proto_reader", ] } ############################################################################### group("fuzztest") { testonly = true deps = [] deps += [ # deps file ":ts_htrace_fuzz_test", ] } ###############################################################################