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("//build/ohos.gni") 15import("//build/test.gni") 16import("../../../ressched.gni") 17 18module_output_path = "resource_schedule_service/ressched" 19 20ohos_unittest("event_controller_test") { 21 module_out_path = module_output_path 22 23 include_dirs = [ 24 "${ressched_common}/include", 25 "${ressched_interfaces}/innerkits/ressched_client/include", 26 ] 27 28 sources = [ 29 "event_controller_test.cpp", 30 "observer_event_test.cpp", 31 ] 32 33 deps = [ 34 "${ressched_services}:resschedsvc_static", 35 "//third_party/googletest:gtest_main", 36 ] 37 38 external_deps = [ 39 "ability_base:want", 40 "ability_runtime:abilitykit_native", 41 "ability_runtime:app_manager", 42 "ability_runtime:connection_obs_manager", 43 "ability_runtime:wantagent_innerkits", 44 "bundle_framework:appexecfwk_base", 45 "common_event_service:cesfwk_innerkits", 46 "hilog:libhilog", 47 "hisysevent:libhisysevent", 48 "hisysevent:libhisyseventmanager", 49 "input:libmmi-client", 50 "ipc:ipc_single", 51 "samgr:samgr_proxy", 52 ] 53 54 defines = [] 55 56 if (ressched_with_communication_netmanager_base_enable) { 57 defines += [ "RESSCHED_COMMUNICATION_NETMANAGER_BASE_ENABLE" ] 58 external_deps += [ "netmanager_base:net_conn_manager_if" ] 59 } 60 61 subsystem_name = "resourceschedule" 62 part_name = "resource_schedule_service" 63} 64 65group("unittest") { 66 testonly = true 67 deps = [] 68 deps += [ ":event_controller_test" ] 69} 70