1# Copyright (c) Huawei Technologies Co., Ltd. 2023. 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/ohos.gni") 16import("../../../build/test.gni") 17import("../../test_ts.gni") 18 19##############################fuzztest########################################## 20ohos_fuzztest("ts_selector_fuzz_test") { 21 include_dirs = [ 22 "../../../src/proto_reader/include", 23 "../../../src", 24 "../../../src/base", 25 "../../../src/table", 26 "../../../src/filter", 27 "../../../src/trace_data", 28 "../../../src/parser", 29 "../../../src/trace_streamer", 30 "../../../src/include", 31 "../../../src/parser/ptreader_parser", 32 "../../../src/cfg", 33 "../../../src/metrics", 34 "${THIRD_PARTY}/sqlite/include", 35 "${THIRD_PARTY}/protobuf/src", 36 "${THIRD_PARTY}/bounds_checking_function/include", 37 "${THIRD_PARTY}/json/single_include/nlohmann", 38 ] 39 include_dirs += [ 40 "${TRACE_STDTYPE}", 41 "${TRACE_STDTYPE}/ftrace", 42 "${TRACE_STDTYPE}/ftrace/template", 43 "${TRACE_STDTYPE}/hilog", 44 "${TRACE_STDTYPE}/hiperf", 45 "${TRACE_STDTYPE}/hisysevent", 46 "${TRACE_STDTYPE}/htrace", 47 "${TRACE_STDTYPE}/measure", 48 "${TRACE_STDTYPE}/xpower", 49 ] 50 cflags = [ 51 "-g", 52 "-O0", 53 "-Wno-unused-variable", 54 "-fno-omit-frame-pointer", 55 ] 56 sources = [ "selector_fuzzer.cpp" ] 57 ldflags = [ 58 "-fprofile-arcs", 59 "-ftest-coverage", 60 "--coverage", 61 ] 62 deps = [ 63 "${THIRD_PARTY}/protobuf:protobuf_lite_static", 64 "${THIRD_PARTY}/protobuf:protobuf_static", 65 "../../../src:trace_streamer_source", 66 "../../../src/proto_reader:proto_reader", 67 ] 68} 69 70############################################################################### 71group("fuzztest") { 72 testonly = true 73 deps = [] 74 deps += [ 75 # deps file 76 ":ts_selector_fuzz_test", 77 ] 78} 79############################################################################### 80