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