1# Copyright (c) 2022-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("//base/security/device_auth/deps_adapter/deviceauth_hals.gni") 15import("//base/security/device_auth/services/deviceauth.gni") 16 17#####################hydra-fuzz################### 18import("//build/config/features.gni") 19import("//build/ohos.gni") 20import("//build/test.gni") 21module_output_path = "device_auth/device_auth" 22 23##############################fuzztest########################################## 24ohos_fuzztest("DevAuthServDeleteGroupFuzzTest") { 25 module_out_path = module_output_path 26 fuzz_config_file = "${deviceauth_path}/test/fuzztest/device_auth_service/devauthservdeletegroup_fuzzer" 27 include_dirs = inc_path + hals_inc_path 28 include_dirs += [ 29 "${frameworks_path}/inc/standard", 30 "${dev_frameworks_path}/inc/permission_adapter", 31 "${dev_frameworks_path}/inc/hiview_adapter", 32 ] 33 sources = [ "devauthservdeletegroup_fuzzer.cpp" ] 34 sources += identity_service_mock_files 35 sources += deviceauth_files 36 sources += sa_load_on_demand_mock_files 37 sources += hiview_adapter_files 38 if (device_auth_enable_soft_bus_channel == true) { 39 sources -= soft_bus_channel_files 40 sources += soft_bus_channel_mock_files 41 } 42 defines = deviceauth_defines 43 if (support_os_account) { 44 sources -= os_account_adapter_files 45 sources += os_account_adapter_mock_files 46 } 47 cflags = [ 48 "-g", 49 "-O0", 50 "-Wno-unused-variable", 51 "-fno-omit-frame-pointer", 52 "-DHILOG_ENABLE", 53 ] 54 cflags += build_flags 55 if (target_cpu == "arm") { 56 cflags += [ "-DBINDER_IPC_32BIT" ] 57 } 58 deps = [ "${deps_adapter_path}:${hal_module_test_name}" ] 59 external_deps = [ 60 "cJSON:cjson", 61 "c_utils:utils", 62 "dsoftbus:softbus_client", 63 "hilog:libhilog", 64 "hisysevent:libhisysevent", 65 "hitrace:hitrace_meter", 66 ] 67} 68 69############################################################################### 70group("fuzztest") { 71 testonly = true 72 deps = [] 73 deps += [ 74 # deps file 75 ":DevAuthServDeleteGroupFuzzTest", 76 ] 77} 78############################################################################### 79