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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/ohos.gni") 17import("//build/test.gni") 18import("../../../cgroup_sched.gni") 19if (has_bg_task_mgr) { 20 import("//foundation/resourceschedule/background_task_mgr/bgtaskmgr.gni") 21} 22 23module_output_path = "resource_schedule_service/cgroup_sched" 24 25##############################fuzztest########################################## 26ohos_fuzztest("CgroupSchedFuzzTest") { 27 module_out_path = module_output_path 28 fuzz_config_file = "${cgroup_sched_path}/test/fuzztest/cgroupsched_fuzzer" 29 30 include_dirs = [ 31 "${cgroup_sched_framework}/sched_controller/include", 32 "${cgroup_sched_interfaces}/innerkits/ressched_client/include", 33 "${cgroup_sched_common}/include", 34 "${cgroup_sched_framework}/utils/include", 35 ] 36 37 cflags = [ 38 "-g", 39 "-O0", 40 "-Wno-unused-variable", 41 "-fno-omit-frame-pointer", 42 ] 43 44 sources = [ "cgroupsched_fuzzer.cpp" ] 45 46 deps = [ "${cgroup_sched_framework}:cgroup_sched" ] 47 48 external_deps = [ 49 "ability_runtime:app_manager", 50 "ability_runtime:wantagent_innerkits", 51 "c_utils:utils", 52 "common_event_service:cesfwk_innerkits", 53 "eventhandler:libeventhandler", 54 "hilog:libhilog", 55 "hisysevent:libhisysevent", 56 "hitrace:hitrace_meter", 57 "ipc:ipc_single", 58 "samgr:samgr_proxy", 59 "window_manager:libwm", 60 ] 61 62 if (has_bg_task_mgr) { 63 defines = [ "CONFIG_BGTASK_MGR" ] 64 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 65 } 66 67 part_name = "resource_schedule_service" 68 subsystem_name = "resourceschedule" 69} 70 71############################################################################### 72group("fuzztest") { 73 testonly = true 74 deps = [] 75 deps += [ 76 # deps file 77 ":CgroupSchedFuzzTest", 78 ] 79} 80############################################################################### 81