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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/test.gni") 17module_output_path = "work_scheduler/workscheduleservice" 18 19import("//foundation/resourceschedule/work_scheduler/workscheduler.gni") 20config("worksched_private_config") { 21 include_dirs = [ 22 "${worksched_service_path}/zidl/include", 23 "${worksched_service_path}/native/include", 24 ] 25} 26 27##############################fuzztest########################################## 28ohos_fuzztest("WorkScheduleServiceFuzzTest") { 29 module_out_path = module_output_path 30 fuzz_config_file = "//foundation/resourceschedule/work_scheduler/test/fuzztest/workscheduleservice_fuzzer" 31 32 configs = [ ":worksched_private_config" ] 33 cflags = [ 34 "-g", 35 "-O0", 36 "-Wno-unused-variable", 37 "-fno-omit-frame-pointer", 38 ] 39 sources = [ "workscheduleservice_fuzzer.cpp" ] 40 41 deps = [ 42 "${worksched_frameworks_path}:workschedclient", 43 "${worksched_frameworks_path}/extension:workschedextension", 44 "${worksched_service_path}:workschedservice", 45 "${worksched_utils_path}:workschedutils", 46 "//third_party/jsoncpp", 47 ] 48 49 external_deps = [ 50 "ability_base:want", 51 "ability_runtime:ability_manager", 52 "ability_runtime:app_manager", 53 "battery_manager:batterysrv_client", 54 "bundle_framework:appexecfwk_base", 55 "bundle_framework:appexecfwk_core", 56 "c_utils:utils", 57 "common_event_service:cesfwk_innerkits", 58 "eventhandler:libeventhandler", 59 "hisysevent_native:libhisysevent", 60 "hiviewdfx_hilog_native:libhilog", 61 "ipc:ipc_core", 62 "netmanager_base:net_conn_manager_if", 63 "safwk:system_ability_fwk", 64 "samgr:samgr_proxy", 65 "thermal_manager:thermalsrv_client", 66 ] 67 68 resource_config_file = 69 "//foundation/resourceschedule/work_scheduler/test/resource/ohos_test.xml" 70} 71 72############################################################################### 73group("fuzztest") { 74 testonly = true 75 deps = [] 76 deps += [ 77 # deps file 78 ":WorkScheduleServiceFuzzTest", 79 ] 80} 81############################################################################### 82