1# Copyright (c) 2021 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 14#####################hydra-fuzz################### 15import("//build/ohos.gni") 16import("../../../build/test.gni") 17import("../../test_ts.gni") 18 19##############################fuzztest########################################## 20ohos_fuzztest("ts_htrace_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/bytrace_parser", 32 "../../../src/cfg", 33 "${THIRD_PARTY}/sqlite/include", 34 "${THIRD_PARTY}/protobuf/src", 35 "${THIRD_PARTY}/bounds_checking_function/include", 36 ] 37 cflags = [ 38 "-g", 39 "-O0", 40 "-Wno-unused-variable", 41 "-fno-omit-frame-pointer", 42 ] 43 sources = [ "htrace_fuzzer.cpp" ] 44 ldflags = [ 45 "-fprofile-arcs", 46 "-ftest-coverage", 47 "--coverage", 48 ] 49 deps = [ 50 "${THIRD_PARTY}/protobuf:protobuf_lite_static", 51 "${THIRD_PARTY}/protobuf:protobuf_static", 52 "../../../src:trace_streamer_source", 53 "../../../src/proto_reader:proto_reader", 54 ] 55} 56 57############################################################################### 58group("fuzztest") { 59 testonly = true 60 deps = [] 61 deps += [ 62 # deps file 63 ":ts_htrace_fuzz_test", 64 ] 65} 66############################################################################### 67