179a732c7Sopenharmony_ci# Copyright (c) 2022-2024 Huawei Device Co., Ltd. 279a732c7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 379a732c7Sopenharmony_ci# you may not use this file except in compliance with the License. 479a732c7Sopenharmony_ci# You may obtain a copy of the License at 579a732c7Sopenharmony_ci# 679a732c7Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 779a732c7Sopenharmony_ci# 879a732c7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 979a732c7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1079a732c7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1179a732c7Sopenharmony_ci# See the License for the specific language governing permissions and 1279a732c7Sopenharmony_ci# limitations under the License. 1379a732c7Sopenharmony_ci 1479a732c7Sopenharmony_ci#####################hydra-fuzz################### 1579a732c7Sopenharmony_ciimport("//build/config/features.gni") 1679a732c7Sopenharmony_ciimport("//build/test.gni") 1779a732c7Sopenharmony_ciimport("//foundation/distributedhardware/device_manager/device_manager.gni") 1879a732c7Sopenharmony_ci 1979a732c7Sopenharmony_ci##############################fuzztest########################################## 2079a732c7Sopenharmony_ciohos_fuzztest("DmCommonEventManagerFuzzTest") { 2179a732c7Sopenharmony_ci module_out_path = fuzz_test_output_path 2279a732c7Sopenharmony_ci fuzz_config_file = 2379a732c7Sopenharmony_ci "${devicemanager_path}/test/commonfuzztest/dmcommoneventmanager_fuzzer" 2479a732c7Sopenharmony_ci 2579a732c7Sopenharmony_ci include_dirs = [ 2679a732c7Sopenharmony_ci "${utils_path}/include", 2779a732c7Sopenharmony_ci "${common_path}/include", 2879a732c7Sopenharmony_ci "${common_path}/include/ipc", 2979a732c7Sopenharmony_ci "${common_path}/include/ipc/model", 3079a732c7Sopenharmony_ci "${utils_path}/include/ipc/standard", 3179a732c7Sopenharmony_ci "${servicesimpl_path}/include", 3279a732c7Sopenharmony_ci "${servicesimpl_path}/include/dependency/commonevent", 3379a732c7Sopenharmony_ci ] 3479a732c7Sopenharmony_ci 3579a732c7Sopenharmony_ci cflags = [ 3679a732c7Sopenharmony_ci "-g", 3779a732c7Sopenharmony_ci "-O0", 3879a732c7Sopenharmony_ci "-Dprivate=public", 3979a732c7Sopenharmony_ci "-Dprotected=public", 4079a732c7Sopenharmony_ci "-Wno-unused-variable", 4179a732c7Sopenharmony_ci "-fno-omit-frame-pointer", 4279a732c7Sopenharmony_ci ] 4379a732c7Sopenharmony_ci 4479a732c7Sopenharmony_ci sources = [ 4579a732c7Sopenharmony_ci "${servicesimpl_path}/src/dependency/commonevent/dm_common_event_manager.cpp", 4679a732c7Sopenharmony_ci "dm_common_event_manager_fuzzer.cpp", 4779a732c7Sopenharmony_ci ] 4879a732c7Sopenharmony_ci 4979a732c7Sopenharmony_ci deps = [ 5079a732c7Sopenharmony_ci "${innerkits_path}/native_cpp:devicemanagersdk", 5179a732c7Sopenharmony_ci "${servicesimpl_path}:devicemanagerserviceimpl", 5279a732c7Sopenharmony_ci ] 5379a732c7Sopenharmony_ci 5479a732c7Sopenharmony_ci defines = [ 5579a732c7Sopenharmony_ci "HI_LOG_ENABLE", 5679a732c7Sopenharmony_ci "DH_LOG_TAG=\"DmCommonEventManagerFuzzTest\"", 5779a732c7Sopenharmony_ci "LOG_DOMAIN=0xD004110", 5879a732c7Sopenharmony_ci ] 5979a732c7Sopenharmony_ci 6079a732c7Sopenharmony_ci external_deps = [ 6179a732c7Sopenharmony_ci "ability_base:want", 6279a732c7Sopenharmony_ci "ability_runtime:ability_manager", 6379a732c7Sopenharmony_ci "c_utils:utils", 6479a732c7Sopenharmony_ci "common_event_service:cesfwk_core", 6579a732c7Sopenharmony_ci "common_event_service:cesfwk_innerkits", 6679a732c7Sopenharmony_ci "dsoftbus:softbus_client", 6779a732c7Sopenharmony_ci "hilog:libhilog", 6879a732c7Sopenharmony_ci "init:libbegetutil", 6979a732c7Sopenharmony_ci "ipc:ipc_core", 7079a732c7Sopenharmony_ci "safwk:system_ability_fwk", 7179a732c7Sopenharmony_ci "samgr:samgr_proxy", 7279a732c7Sopenharmony_ci ] 7379a732c7Sopenharmony_ci} 7479a732c7Sopenharmony_ci 7579a732c7Sopenharmony_ci############################################################################### 7679a732c7Sopenharmony_cigroup("fuzztest") { 7779a732c7Sopenharmony_ci testonly = true 7879a732c7Sopenharmony_ci 7979a732c7Sopenharmony_ci deps = [ ":DmCommonEventManagerFuzzTest" ] 8079a732c7Sopenharmony_ci} 8179a732c7Sopenharmony_ci############################################################################### 82