# Copyright (c) 2022-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/test.gni") import("../../../ressched.gni") module_output_path = "resource_schedule_service/ressched" ohos_unittest("event_controller_test") { module_out_path = module_output_path include_dirs = [ "${ressched_common}/include", "${ressched_interfaces}/innerkits/ressched_client/include", ] sources = [ "event_controller_test.cpp", "observer_event_test.cpp", ] deps = [ "${ressched_services}:resschedsvc_static", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "ability_runtime:abilitykit_native", "ability_runtime:app_manager", "ability_runtime:connection_obs_manager", "ability_runtime:wantagent_innerkits", "bundle_framework:appexecfwk_base", "common_event_service:cesfwk_innerkits", "hilog:libhilog", "hisysevent:libhisysevent", "hisysevent:libhisyseventmanager", "input:libmmi-client", "ipc:ipc_single", "os_account:os_account_innerkits", "samgr:samgr_proxy", ] defines = [] if (ressched_with_communication_netmanager_base_enable) { defines += [ "RESSCHED_COMMUNICATION_NETMANAGER_BASE_ENABLE" ] external_deps += [ "netmanager_base:net_conn_manager_if" ] } if (rss_request_enable) { defines += [ "RESSCHED_REQUEST_REQUEST" ] external_deps += [ "request:request_native" ] } if (device_movement_perception_enable) { defines += [ "DEVICE_MOVEMENT_PERCEPTION_ENABLE" ] external_deps += [ "movement:movement_client" ] } if (ressched_with_resourceschedule_multimedia_av_session_enable) { defines += [ "RESSCHED_MULTIMEDIA_AV_SESSION_ENABLE" ] external_deps += [ "av_session:avsession_client" ] } if (ressched_with_resourceschedule_multimedia_audio_framework_enable) { defines += [ "RESSCHED_AUDIO_FRAMEWORK_ENABLE" ] external_deps += [ "audio_framework:audio_client" ] } if (ressched_with_telephony_state_registry_enable) { defines += [ "RESSCHED_TELEPHONY_STATE_REGISTRY_ENABLE" ] external_deps += [ "core_service:tel_core_service_api", "state_registry:tel_state_registry_api", ] } subsystem_name = "resourceschedule" part_name = "resource_schedule_service" } group("unittest") { testonly = true deps = [] deps += [ ":event_controller_test" ] }