1# Copyright (c) 2022 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/ohos.gni") 15import("//build/test.gni") 16if (os_level == "standard") { 17 ohos_fuzztest("DslmFuzzTest") { 18 module_out_path = "device_security_level/device_security_level" 19 fuzz_config_file = "../dslm_fuzzer" 20 21 cflags = [ 22 "-g", 23 "-O0", 24 "-Wno-unused-variable", 25 "-fno-omit-frame-pointer", 26 ] 27 28 include_dirs = [ 29 "../../../baselib/utils/include", 30 "../../../baselib/msglib/include", 31 "../../../baselib/msglib/src/utils", 32 "../../../baselib/msglib/src/common", 33 "../../../baselib/msglib/src/standard", 34 "../../../common/include", 35 "../../../interfaces/inner_api/src/standard", 36 "../../../oem_property/include", 37 "../../../oem_property/ohos/common", 38 "../../../oem_property/ohos/standard", 39 "../../../oem_property/ohos/standard/impl", 40 "../../../services/sa/common", 41 "../../../services/sa/standard", 42 "../../../services/include", 43 "../../../services/dslm", 44 "../mock", 45 ] 46 47 sources = [ 48 "../../../baselib/msglib/src/common/messenger.c", 49 "../../../baselib/msglib/src/standard/messenger_device_socket_manager.c", 50 "../../../baselib/msglib/src/standard/messenger_device_status_manager.cpp", 51 "../../../baselib/msglib/src/standard/messenger_impl.c", 52 "../../../services/sa/common/dslm_rpc_process.c", 53 "../../../services/sa/standard/dslm_callback_proxy.cpp", 54 "../../../services/sa/standard/dslm_ipc_process.cpp", 55 "../../../services/sa/standard/dslm_service.cpp", 56 "../mock/mock.cpp", 57 "dslm_fuzzer.cpp", 58 ] 59 60 deps = [ 61 "../../../baselib/utils:utils_static", 62 "../../../oem_property:dslm_oem_ext", 63 "../../../services/common:service_common_obj", 64 "../../../services/dfx:dslm_extension_dfx", 65 "../../../services/dslm:service_dslm_obj", 66 "../../../services/msg:service_msg_obj", 67 ] 68 69 external_deps = [ 70 "c_utils:utils", 71 "device_manager:devicemanagersdk", 72 "device_security_level:dslm_sdk", 73 "dsoftbus:softbus_client", 74 "hilog:libhilog", 75 "huks:libhukssdk", 76 "ipc:ipc_core", 77 "safwk:system_ability_fwk", 78 "samgr:samgr_proxy", 79 ] 80 } 81} 82