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") 16import( 17 "//foundation/resourceschedule/resource_schedule_service/cgroup_sched/cgroup_sched.gni") 18import( 19 "//foundation/resourceschedule/resource_schedule_service/ressched/sched_controller/sched_controller.gni") 20 21module_output_path = "resource_schedule_service/ressched" 22 23ohos_unittest("event_controller_test") { 24 module_out_path = module_output_path 25 26 include_dirs = [ 27 "//foundation/resourceschedule/resource_schedule_service/ressched/common/include", 28 "//foundation/resourceschedule/resource_schedule_service/ressched/interfaces/innerkits/ressched_client/include", 29 "${cgroup_sched_common}/include", 30 "${cgroup_sched_framework}/process_group/include", 31 "${cgroup_sched_framework}/sched_controller/include", 32 "${cgroup_sched_framework}/utils/include", 33 "${sched_controller_event}/include", 34 ] 35 36 sources = [ 37 "${cgroup_sched_framework}/utils/ressched_utils.cpp", 38 "${sched_controller_path}/test/unittest/event_controller_test.cpp", 39 ] 40 41 deps = [ 42 "${sched_controller_path}:sched_controller", 43 "//third_party/googletest:gtest_main", 44 ] 45 46 external_deps = [ 47 "ability_base:want", 48 "ability_runtime:abilitykit_native", 49 "ability_runtime:app_manager", 50 "ability_runtime:wantagent_innerkits", 51 "bundle_framework:appexecfwk_base", 52 "common_event_service:cesfwk_innerkits", 53 "hiviewdfx_hilog_native:libhilog", 54 "ipc:ipc_core", 55 "netmanager_base:net_conn_manager_if", 56 "samgr:samgr_proxy", 57 ] 58 59 subsystem_name = "resourceschedule" 60 part_name = "resource_schedule_service" 61} 62 63group("unittest") { 64 testonly = true 65 deps = [] 66 deps += [ ":event_controller_test" ] 67} 68