# Copyright (c) 2022 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/test.gni") import( "//foundation/resourceschedule/resource_schedule_service/ressched/ressched.gni") group("unittest") { testonly = true deps = [ ":resschedfwk_test", ":resschedservice_test" ] } config("ut_resschedfwk_config") { include_dirs = [ "include", "//foundation/resourceschedule/resource_schedule_service/soc_perf/include", "//foundation/resourceschedule/resource_schedule_service/soc_perf/include/client", ] } config("ut_resschedservice_config") { include_dirs = [ "resschedservice/include" ] } module_output_path = "resource_schedule_service/ressched" private_external_deps = [ "eventhandler:libeventhandler", "ipc:ipc_core", ] private_deps = [ "${ressched_interfaces}/innerkits/ressched_client:ressched_client", "${ressched_plugins}/socperf_plugin:socperf_plugin", "${ressched_services}:resschedsvc", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//commonlibrary/c_utils/base:utils", "//third_party/googletest:gtest_main", ] ohos_unittest("resschedservice_test") { module_out_path = module_output_path sources = [ "src/res_sched_service_test.cpp", ] configs = [ ":ut_resschedservice_config", "${ressched_services}:ressched_config", ] deps = [ "//third_party/googletest:gtest_main", "${ressched_services}:resschedsvc", ] external_deps = [ "ipc:ipc_core", "c_utils:utils", ] } ohos_unittest("resschedfwk_test") { module_out_path = module_output_path resource_config_file = "//foundation/resourceschedule/resource_schedule_service/ressched/test/resource/resschedfwk/ohos_test.xml" sources = [ "src/config_reader_test.cpp", "src/plugin_mgr_test.cpp", "src/plugin_switch_test.cpp", "src/res_sched_mgr_test.cpp", ] configs = [ ":ut_resschedfwk_config", "${ressched_interfaces}/innerkits/ressched_client:client_public_config", "${ressched_services}:ressched_config", "${ressched_plugins}/socperf_plugin:socperf_plugin_config", ] deps = private_deps external_deps = private_external_deps }