1# Copyright (c) 2022 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("//base/telephony/core_service/telephony.gni") 16import("//build/config/features.gni") 17import("//build/ohos.gni") 18import("//build/test.gni") 19 20##############################fuzztest########################################## 21ohos_fuzztest("SmsRecvItemFuzzTest") { 22 module_output_path = "sms_mms/SmsRecvItemFuzzTest" 23 module_out_path = module_output_path 24 fuzz_config_file = "//base/telephony/sms_mms/test/fuzztest/smsrecvitem_fuzzer" 25 26 include_dirs = [ 27 "//base/telephony/core_service/frameworks/js/napi", 28 "//base/telephony/core_service/interfaces/innerkits/include", 29 "//base/telephony/core_service/interfaces/innerkits/ims/include", 30 "//base/telephony/sms_mms/frameworks/js/napi/include", 31 "//base/telephony/sms_mms/services/include", 32 "//base/telephony/sms_mms/test/fuzztest/common_fuzzer", 33 "//base/telephony/sms_mms/interfaces/innerkits/", 34 "//base/telephony/sms_mms/interfaces/innerkits/ims", 35 "//third_party/curl/include", 36 "//foundation/communication/netmanager_base/services/netconnmanager/include", 37 ] 38 39 deps = [ 40 "//base/telephony/sms_mms:tel_sms_mms", 41 "//base/telephony/sms_mms/frameworks/native:tel_sms_mms_api", 42 "//foundation/ability/ability_runtime/frameworks/native/ability/native:data_ability_helper", 43 "//foundation/ability/ability_runtime/interfaces/inner_api/ability_manager:ability_manager", 44 "//foundation/communication/netmanager_base/services/netconnmanager:net_conn_manager", 45 "//third_party/curl:curl", 46 ] 47 48 external_deps = [ 49 "access_token:libaccesstoken_sdk", 50 "access_token:libnativetoken", 51 "access_token:libtoken_setproc", 52 "c_utils:utils", 53 "common_event_service:cesfwk_innerkits", 54 "eventhandler:libeventhandler", 55 "ipc:ipc_core", 56 "netmanager_base:net_conn_manager_if", 57 ] 58 defines += [ 59 "TELEPHONY_LOG_TAG = \"SmsMmsFuzzTest\"", 60 "LOG_DOMAIN = 0xD000F00", 61 ] 62 if (is_standard_system) { 63 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 64 } else { 65 external_deps += [ "hilog:libhilog" ] 66 } 67 68 cflags = [ 69 "-g", 70 "-O0", 71 "-Wno-unused-variable", 72 "-fno-omit-frame-pointer", 73 ] 74 75 sources = [ 76 "//base/telephony/sms_mms/test/fuzztest/common_fuzzer/addsmstoken_fuzzer.cpp", 77 "smsrecvitem_fuzzer.cpp", 78 ] 79} 80 81############################################################################### 82group("fuzztest") { 83 testonly = true 84 deps = [] 85 deps += [ 86 # deps file 87 ":SmsRecvItemFuzzTest", 88 ] 89} 90############################################################################### 91