1686862fbSopenharmony_ci# Copyright (c) 2022-2024 Huawei Device Co., Ltd. 2686862fbSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3686862fbSopenharmony_ci# you may not use this file except in compliance with the License. 4686862fbSopenharmony_ci# You may obtain a copy of the License at 5686862fbSopenharmony_ci# 6686862fbSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7686862fbSopenharmony_ci# 8686862fbSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9686862fbSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10686862fbSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11686862fbSopenharmony_ci# See the License for the specific language governing permissions and 12686862fbSopenharmony_ci# limitations under the License. 13686862fbSopenharmony_ci 14686862fbSopenharmony_ci#####################hydra-fuzz################### 15686862fbSopenharmony_ciimport("//build/config/features.gni") 16686862fbSopenharmony_ciimport("//build/ohos.gni") 17686862fbSopenharmony_ciimport("//build/test.gni") 18686862fbSopenharmony_ciimport("//foundation/ability/dmsfwk/dmsfwk.gni") 19686862fbSopenharmony_cidistributed_service = "//foundation/ability/dmsfwk/services" 20686862fbSopenharmony_ci 21686862fbSopenharmony_ciconfig("continuationmanager_fuzz_config") { 22686862fbSopenharmony_ci visibility = [ ":*" ] 23686862fbSopenharmony_ci include_dirs = [ 24686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/include/", 25686862fbSopenharmony_ci "//foundation/ability/dmsfwk/interfaces/innerkits/continuation_manager/include/", 26686862fbSopenharmony_ci ] 27686862fbSopenharmony_ci} 28686862fbSopenharmony_ci 29686862fbSopenharmony_cidtbabilitymgr_sources = [ 30686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/continuation_manager/app_connection_stub.cpp", 31686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/continuation_manager/app_device_callback_stub.cpp", 32686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/continuation_manager/connect_status_info.cpp", 33686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/continuation_manager/continuation_extra_params.cpp", 34686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/continuation_manager/continuation_result.cpp", 35686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/continuation_manager/device_selection_notifier_proxy.cpp", 36686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/continuation_manager/device_selection_notifier_stub.cpp", 37686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/continuation_manager/notifier_death_recipient.cpp", 38686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/continuation_manager/notifier_info.cpp", 39686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/distributed_ability_manager_dumper.cpp", 40686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/distributed_ability_manager_service.cpp", 41686862fbSopenharmony_ci "${distributed_service}/dtbabilitymgr/src/distributed_ability_manager_stub.cpp", 42686862fbSopenharmony_ci] 43686862fbSopenharmony_ci 44686862fbSopenharmony_cidtbabilitymgr_external_deps = [ 45686862fbSopenharmony_ci "ability_base:want", 46686862fbSopenharmony_ci "ability_runtime:ability_manager", 47686862fbSopenharmony_ci "access_token:libaccesstoken_sdk", 48686862fbSopenharmony_ci "access_token:libnativetoken_shared", 49686862fbSopenharmony_ci "access_token:libtokensetproc_shared", 50686862fbSopenharmony_ci "bundle_framework:appexecfwk_base", 51686862fbSopenharmony_ci "bundle_framework:appexecfwk_core", 52686862fbSopenharmony_ci "c_utils:utils", 53686862fbSopenharmony_ci "device_manager:devicemanagersdk", 54686862fbSopenharmony_ci "eventhandler:libeventhandler", 55686862fbSopenharmony_ci "ffrt:libffrt", 56686862fbSopenharmony_ci "hilog:libhilog", 57686862fbSopenharmony_ci "init:libbegetutil", 58686862fbSopenharmony_ci "ipc:ipc_core", 59686862fbSopenharmony_ci "safwk:system_ability_fwk", 60686862fbSopenharmony_ci "samgr:samgr_proxy", 61686862fbSopenharmony_ci] 62686862fbSopenharmony_ciif (os_account_part) { 63686862fbSopenharmony_ci dtbabilitymgr_external_deps += [ "os_account:os_account_innerkits" ] 64686862fbSopenharmony_ci} 65686862fbSopenharmony_ci 66686862fbSopenharmony_ci##############################fuzztest########################################## 67686862fbSopenharmony_ciohos_fuzztest("ContinuationManagerFuzzTest") { 68686862fbSopenharmony_ci module_out_path = module_output_path 69686862fbSopenharmony_ci 70686862fbSopenharmony_ci fuzz_config_file = 71686862fbSopenharmony_ci "//foundation/ability/dmsfwk/test/fuzztest/continuationmanager_fuzzer" 72686862fbSopenharmony_ci 73686862fbSopenharmony_ci configs = [ 74686862fbSopenharmony_ci ":continuationmanager_fuzz_config", 75686862fbSopenharmony_ci "${distributed_service}/dtbschedmgr/test/resource:coverage_flags", 76686862fbSopenharmony_ci ] 77686862fbSopenharmony_ci 78686862fbSopenharmony_ci cflags = [ 79686862fbSopenharmony_ci "-g", 80686862fbSopenharmony_ci "-O0", 81686862fbSopenharmony_ci "-Wno-unused-variable", 82686862fbSopenharmony_ci "-fno-omit-frame-pointer", 83686862fbSopenharmony_ci ] 84686862fbSopenharmony_ci 85686862fbSopenharmony_ci sources = [ 86686862fbSopenharmony_ci "continuationmanager_fuzzer.cpp", 87686862fbSopenharmony_ci "fuzz_util.cpp", 88686862fbSopenharmony_ci ] 89686862fbSopenharmony_ci 90686862fbSopenharmony_ci sources += dtbabilitymgr_sources 91686862fbSopenharmony_ci 92686862fbSopenharmony_ci external_deps = dtbabilitymgr_external_deps 93686862fbSopenharmony_ci} 94686862fbSopenharmony_ci 95686862fbSopenharmony_cigroup("fuzztest") { 96686862fbSopenharmony_ci testonly = true 97686862fbSopenharmony_ci deps = [ ":ContinuationManagerFuzzTest" ] 98686862fbSopenharmony_ci} 99