196279301Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 296279301Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 396279301Sopenharmony_ci# you may not use this file except in compliance with the License. 496279301Sopenharmony_ci# You may obtain a copy of the License at 596279301Sopenharmony_ci# 696279301Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 796279301Sopenharmony_ci# 896279301Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 996279301Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1096279301Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1196279301Sopenharmony_ci# See the License for the specific language governing permissions and 1296279301Sopenharmony_ci# limitations under the License. 1396279301Sopenharmony_ci 1496279301Sopenharmony_ci#####################hydra-fuzz################### 1596279301Sopenharmony_ciimport("//base/notification/distributed_notification_service/notification.gni") 1696279301Sopenharmony_ciimport("//build/config/features.gni") 1796279301Sopenharmony_ciimport("//build/test.gni") 1896279301Sopenharmony_ci 1996279301Sopenharmony_ci##############################fuzztest########################################## 2096279301Sopenharmony_ciohos_fuzztest("AnsManagerStubFuzzTest") { 2196279301Sopenharmony_ci module_out_path = service_fuzz_test_path 2296279301Sopenharmony_ci fuzz_config_file = "${component_path}/test/fuzztest/ansmanagerstub_fuzzer" 2396279301Sopenharmony_ci 2496279301Sopenharmony_ci include_dirs = [ 2596279301Sopenharmony_ci "${component_path}/test/fuzztest/fuzz_common_base", 2696279301Sopenharmony_ci "${component_path}/services/ans/include", 2796279301Sopenharmony_ci "${core_path}/common/include", 2896279301Sopenharmony_ci "${core_path}/include", 2996279301Sopenharmony_ci "${inner_api_path}", 3096279301Sopenharmony_ci "${ffrt_path}/interfaces/kits", 3196279301Sopenharmony_ci ] 3296279301Sopenharmony_ci defines = [] 3396279301Sopenharmony_ci cflags = [ 3496279301Sopenharmony_ci "-g", 3596279301Sopenharmony_ci "-O0", 3696279301Sopenharmony_ci "-Wno-unused-variable", 3796279301Sopenharmony_ci "-fno-omit-frame-pointer", 3896279301Sopenharmony_ci ] 3996279301Sopenharmony_ci sources = [ "ansmanagerstub_fuzzer.cpp" ] 4096279301Sopenharmony_ci 4196279301Sopenharmony_ci deps = [ 4296279301Sopenharmony_ci "${component_path}/test/fuzztest/fuzz_common_base:fuzz_common_base", 4396279301Sopenharmony_ci "${frameworks_module_ans_path}:ans_innerkits", 4496279301Sopenharmony_ci "${services_path}/ans:libans", 4596279301Sopenharmony_ci ] 4696279301Sopenharmony_ci 4796279301Sopenharmony_ci if (distributed_notification_supported) { 4896279301Sopenharmony_ci defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] 4996279301Sopenharmony_ci deps += [ "${services_path}/distributed:libans_distributed" ] 5096279301Sopenharmony_ci include_dirs += [ "${services_path}/distributed/include" ] 5196279301Sopenharmony_ci } 5296279301Sopenharmony_ci 5396279301Sopenharmony_ci if (notification_smart_reminder_supported) { 5496279301Sopenharmony_ci defines += [ "NOTIFICATION_SMART_REMINDER_SUPPORTED" ] 5596279301Sopenharmony_ci } 5696279301Sopenharmony_ci 5796279301Sopenharmony_ci external_deps = [ 5896279301Sopenharmony_ci "ability_base:want", 5996279301Sopenharmony_ci "ability_base:zuri", 6096279301Sopenharmony_ci "c_utils:utils", 6196279301Sopenharmony_ci "ffrt:libffrt", 6296279301Sopenharmony_ci "hilog:libhilog", 6396279301Sopenharmony_ci "image_framework:image_native", 6496279301Sopenharmony_ci "ipc:ipc_single", 6596279301Sopenharmony_ci "kv_store:distributeddata_inner", 6696279301Sopenharmony_ci "relational_store:native_rdb", 6796279301Sopenharmony_ci ] 6896279301Sopenharmony_ci 6996279301Sopenharmony_ci if (device_usage) { 7096279301Sopenharmony_ci external_deps += [ "device_usage_statistics:usagestatsinner" ] 7196279301Sopenharmony_ci defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] 7296279301Sopenharmony_ci } 7396279301Sopenharmony_ci 7496279301Sopenharmony_ci if (hisysevent_usage) { 7596279301Sopenharmony_ci cflags += [ "-DHAS_HISYSEVENT_PART" ] 7696279301Sopenharmony_ci external_deps += [ "hisysevent:libhisysevent" ] 7796279301Sopenharmony_ci } 7896279301Sopenharmony_ci 7996279301Sopenharmony_ci if (standby_enable) { 8096279301Sopenharmony_ci external_deps += [ "device_standby:standby_innerkits" ] 8196279301Sopenharmony_ci defines += [ "DEVICE_STANDBY_ENABLE" ] 8296279301Sopenharmony_ci } 8396279301Sopenharmony_ci 8496279301Sopenharmony_ci if (player_framework) { 8596279301Sopenharmony_ci external_deps += [ "player_framework:media_client" ] 8696279301Sopenharmony_ci defines += [ "PLAYER_FRAMEWORK_ENABLE" ] 8796279301Sopenharmony_ci } 8896279301Sopenharmony_ci 8996279301Sopenharmony_ci if (ans_hitrace_usage) { 9096279301Sopenharmony_ci external_deps += [ "hitrace:hitrace_meter" ] 9196279301Sopenharmony_ci defines += [ "HITRACE_METER_ENABLE" ] 9296279301Sopenharmony_ci } 9396279301Sopenharmony_ci 9496279301Sopenharmony_ci if (ans_config_policy_enable) { 9596279301Sopenharmony_ci external_deps += [ "config_policy:configpolicy_util" ] 9696279301Sopenharmony_ci defines += [ "CONFIG_POLICY_ENABLE" ] 9796279301Sopenharmony_ci } 9896279301Sopenharmony_ci 9996279301Sopenharmony_ci if (screenlock_mgr_enable) { 10096279301Sopenharmony_ci external_deps += [ "screenlock_mgr:screenlock_client" ] 10196279301Sopenharmony_ci defines += [ "SCREENLOCK_MGR_ENABLE" ] 10296279301Sopenharmony_ci } 10396279301Sopenharmony_ci 10496279301Sopenharmony_ci if (distributed_notification_service_feature_summary) { 10596279301Sopenharmony_ci defines += [ "ENABLE_ANS_EXT_WRAPPER" ] 10696279301Sopenharmony_ci } 10796279301Sopenharmony_ci 10896279301Sopenharmony_ci if (telephony_cust) { 10996279301Sopenharmony_ci defines += [ "ENABLE_ANS_TELEPHONY_CUST_WRAPPER" ] 11096279301Sopenharmony_ci } 11196279301Sopenharmony_ci 11296279301Sopenharmony_ci if (distributed_notification_service_feature_disable_fa_model) { 11396279301Sopenharmony_ci defines += [ "ANS_DISABLE_FA_MODEL" ] 11496279301Sopenharmony_ci } 11596279301Sopenharmony_ci} 11696279301Sopenharmony_ci 11796279301Sopenharmony_ci############################################################################### 11896279301Sopenharmony_cigroup("fuzztest") { 11996279301Sopenharmony_ci testonly = true 12096279301Sopenharmony_ci deps = [ ":AnsManagerStubFuzzTest" ] 12196279301Sopenharmony_ci} 12296279301Sopenharmony_ci############################################################################### 123