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