1# Copyright (c) 2024 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") 18 19##############################fuzztest########################################## 20ohos_fuzztest("UpdateCellularDataFuzzTest") { 21 module_output_path = "cellular_data/cellular_data" 22 module_out_path = module_output_path 23 SOURCE_DIR = "../../.." 24 fuzz_config_file = "$SOURCE_DIR/test/fuzztest/updatecellulardata_fuzzer" 25 include_dirs = [ 26 "$SOURCE_DIR/services/include", 27 "$SOURCE_DIR/services/include/apn_manager", 28 "$SOURCE_DIR/services/include/common", 29 "$SOURCE_DIR/services/include/state_machine", 30 "$SOURCE_DIR/services/include/utils", 31 "$SOURCE_DIR/test/fuzztest/common_fuzzer", 32 ] 33 34 deps = [ 35 "$SOURCE_DIR:tel_cellular_data", 36 "$SOURCE_DIR/frameworks/native:tel_cellular_data_api", 37 ] 38 39 external_deps = [ 40 "ability_base:want", 41 "ability_base:zuri", 42 "ability_runtime:ability_manager", 43 "ability_runtime:abilitykit_native", 44 "ability_runtime:data_ability_helper", 45 "ability_runtime:dataobs_manager", 46 "access_token:libaccesstoken_sdk", 47 "access_token:libnativetoken_shared", 48 "access_token:libtoken_setproc", 49 "bundle_framework:appexecfwk_core", 50 "c_utils:utils", 51 "common_event_service:cesfwk_innerkits", 52 "core_service:libtel_common", 53 "core_service:tel_core_service_api", 54 "data_share:datashare_common", 55 "data_share:datashare_consumer", 56 "eventhandler:libeventhandler", 57 "hilog:libhilog", 58 "init:libbegetutil", 59 "ipc:ipc_single", 60 "netmanager_base:net_conn_manager_if", 61 "netmanager_base:net_policy_manager_if", 62 "netmanager_base:net_stats_manager_if", 63 "preferences:native_preferences", 64 "relational_store:native_dataability", 65 "relational_store:native_rdb", 66 "safwk:system_ability_fwk", 67 "samgr:samgr_proxy", 68 "telephony_data:tel_telephony_data", 69 ] 70 71 defines = [ 72 "TELEPHONY_LOG_TAG = \"CellularDataFuzzTest\"", 73 "LOG_DOMAIN = 0xD000F00", 74 ] 75 76 cflags = [ 77 "-g", 78 "-O0", 79 "-Wno-unused-variable", 80 "-fno-omit-frame-pointer", 81 "-flto", 82 "-fsanitize=cfi", 83 "-fsanitize-cfi-cross-dso", 84 "-fvisibility=hidden", 85 ] 86 87 ldflags = [ 88 "-flto", 89 "-fsanitize=cfi", 90 "-fsanitize-cfi-cross-dso", 91 ] 92 93 sources = [ 94 "$SOURCE_DIR/test/fuzztest/common_fuzzer/adddatatoken_fuzzer.cpp", 95 "updatecellulardata_fuzzer.cpp", 96 ] 97} 98 99############################################################################### 100group("fuzztest") { 101 testonly = true 102 deps = [] 103 deps += [ 104 # deps file 105 ":UpdateCellularDataFuzzTest", 106 ] 107} 108############################################################################### 109