1# Copyright (c) 2023 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 14import("//build/config/features.gni") 15import("//build/test.gni") 16import("../../../../../access_token.gni") 17 18ohos_fuzztest("DeleteRemoteHapTokenInfoStubFuzzTest") { 19 module_out_path = module_output_path_service_access_token 20 fuzz_config_file = "." 21 22 sources = [ "deleteremotehaptokeninfostub_fuzzer.cpp" ] 23 24 cflags = [ 25 "-g", 26 "-O0", 27 "-Wno-unused-variable", 28 "-fno-omit-frame-pointer", 29 ] 30 31 configs = [ "${access_token_path}/config:coverage_flags" ] 32 33 include_dirs = [ 34 "${access_token_path}/services/common/handler/include", 35 "${access_token_path}/services/tokensyncmanager/include/service", 36 "${access_token_path}/services/tokensyncmanager/include/remote", 37 "${access_token_path}/services/tokensyncmanager/include/command", 38 "${access_token_path}/services/tokensyncmanager/include/common", 39 "${access_token_path}/services/tokensyncmanager/include/device", 40 "${access_token_path}/services/tokensyncmanager/include/protocol", 41 "${access_token_path}/frameworks/common/include", 42 "${access_token_path}/frameworks/accesstoken/include", 43 "${access_token_path}/frameworks/tokensync/include", 44 "${access_token_path}/interfaces/innerkits/accesstoken/include", 45 "//third_party/json/include/", 46 ] 47 48 sources += [ 49 "${access_token_path}/services/tokensyncmanager/src/command/base_remote_command.cpp", 50 "${access_token_path}/services/tokensyncmanager/src/command/delete_remote_token_command.cpp", 51 "${access_token_path}/services/tokensyncmanager/src/command/sync_remote_hap_token_command.cpp", 52 "${access_token_path}/services/tokensyncmanager/src/command/sync_remote_native_token_command.cpp", 53 "${access_token_path}/services/tokensyncmanager/src/command/update_remote_hap_token_command.cpp", 54 "${access_token_path}/services/tokensyncmanager/src/common/constant.cpp", 55 "${access_token_path}/services/tokensyncmanager/src/device/device_info_manager.cpp", 56 "${access_token_path}/services/tokensyncmanager/src/device/device_info_repository.cpp", 57 "${access_token_path}/services/tokensyncmanager/src/remote/remote_command_executor.cpp", 58 "${access_token_path}/services/tokensyncmanager/src/remote/remote_command_factory.cpp", 59 "${access_token_path}/services/tokensyncmanager/src/remote/remote_command_manager.cpp", 60 "${access_token_path}/services/tokensyncmanager/src/remote/soft_bus_channel.cpp", 61 "${access_token_path}/services/tokensyncmanager/src/remote/soft_bus_device_connection_listener.cpp", 62 "${access_token_path}/services/tokensyncmanager/src/remote/soft_bus_manager.cpp", 63 "${access_token_path}/services/tokensyncmanager/src/remote/soft_bus_socket_listener.cpp", 64 "${access_token_path}/services/tokensyncmanager/src/service/token_sync_manager_service.cpp", 65 "${access_token_path}/services/tokensyncmanager/src/service/token_sync_manager_stub.cpp", 66 ] 67 68 cflags_cc = [ 69 "-DHILOG_ENABLE", 70 "-DDEBUG_API_PERFORMANCE", 71 ] 72 73 deps = [ 74 "${access_token_path}/frameworks/accesstoken:accesstoken_communication_adapter_cxx", 75 "${access_token_path}/frameworks/common:accesstoken_common_cxx", 76 "${access_token_path}/interfaces/innerkits/accesstoken:libaccesstoken_sdk", 77 "${access_token_path}/interfaces/innerkits/token_setproc:libtoken_setproc", 78 "//third_party/zlib:shared_libz", 79 ] 80 81 external_deps = [ 82 "c_utils:utils", 83 "dsoftbus:softbus_client", 84 "hilog:libhilog", 85 "ipc:ipc_core", 86 "safwk:system_ability_fwk", 87 "samgr:samgr_proxy", 88 ] 89 90 if (eventhandler_enable == true) { 91 cflags_cc += [ "-DEVENTHANDLER_ENABLE" ] 92 sources += [ "${access_token_path}/services/common/handler/src/access_event_handler.cpp" ] 93 external_deps += [ "eventhandler:libeventhandler" ] 94 } 95 96 if (token_sync_enable == true) { 97 cflags_cc += [ "-DTOKEN_SYNC_ENABLE" ] 98 external_deps += [ "device_manager:devicemanagersdk" ] 99 } 100} 101