# Copyright (c) 2024-2025 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/ability/ability_runtime/ability_runtime.gni") module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("keep_alive_process_manager_test") { module_out_path = module_output_path include_dirs = [ "mock/include", "${ability_runtime_services_path}/abilitymgr/include", "${ability_runtime_services_path}/abilitymgr/include/keep_alive", "${ability_runtime_services_path}/abilitymgr/include/utils", ] sources = [ "${ability_runtime_services_path}/abilitymgr/src/keep_alive/keep_alive_info.cpp", "${ability_runtime_services_path}/abilitymgr/src/keep_alive/keep_alive_process_manager.cpp", "${ability_runtime_services_path}/abilitymgr/src/process_options.cpp", "keep_alive_process_manager_test.cpp", "mock/src/ability_keep_alive_service.cpp", "mock/src/ability_manager_service.cpp", "mock/src/app_mgr_client.cpp", "mock/src/app_scheduler.cpp", "mock/src/bundle_mgr_helper.cpp", "mock/src/main_element_utils.cpp", "mock/src/mock_my_flag.cpp", "mock/src/parameters.cpp", "mock/src/permission_verification.cpp", ] configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ "${ability_runtime_services_path}/abilitymgr:abilityms" ] external_deps = [ "ability_base:base", "ability_base:want", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "ffrt:libffrt", "googletest:gtest_main", "hilog:libhilog", "hitrace:hitrace_meter", "init:libbeget_proxy", "ipc:ipc_core", ] if (ability_runtime_child_process) { defines = [ "SUPPORT_CHILD_PROCESS" ] } } group("unittest") { testonly = true deps = [ ":keep_alive_process_manager_test" ] }