# 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") process_group_module_output_path = "resource_schedule_service/process_group_test" config("process_group_module_private_config") { visibility = [ ":*" ] include_dirs = [ "../../framework/process_group/include" ] } ohos_unittest("ProcessGroupSubTest") { module_out_path = process_group_module_output_path include_dirs = [ "../../framework/process_group/include", "../../framework/sched_controller/include", ] sources = [ "cgroup_sched_test.cpp", "process_group_sub_test.cpp", ] cflags = [ "-Dprivate=public", "-Dprotected=public", ] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } configs = [ ":process_group_module_private_config" ] deps = [ "../../framework:cgroup_sched", "../../framework/process_group:libprocess_group", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_runtime:app_manager", "c_utils:utils", "ffrt:libffrt", "hilog:libhilog", "samgr:samgr_proxy", "window_manager:libwm", ] } ohos_unittest("ResschedUtilsTest") { module_out_path = process_group_module_output_path include_dirs = [ "../../framework/utils/include", "../../framework/sched_controller/include", ] sources = [ "ressched_utils_test.cpp" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } configs = [ ":process_group_module_private_config" ] deps = [ "//third_party/googletest:gtest_main", "//third_party/json:nlohmann_json_static", ] external_deps = [ "ability_runtime:app_manager", "c_utils:utils", "hilog:libhilog", "resource_schedule_service:cgroup_sched", ] } ohos_executable("process_proup_test") { module_install_dir = "bin/process_group" include_dirs = [] sources = [ "./cgroup_setting_test.cpp" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ "../../framework/process_group:libprocess_group" ] install_enable = true part_name = "resource_schedule_service" subsystem_name = "resourceschedule" } group("unittest") { testonly = true deps = [ ":ProcessGroupSubTest", ":ResschedUtilsTest", ] }