1# Copyright (c) 2024 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/test.gni") 15import("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17module_output_path = "ability_runtime/ability_runtime/appmgrservice" 18 19ohos_unittest("app_native_spawn_manager_test") { 20 module_out_path = module_output_path 21 22 configs = [ "${ability_runtime_services_path}/common:common_config" ] 23 24 cflags = [] 25 if (target_cpu == "arm") { 26 cflags += [ "-DBINDER_IPC_32BIT" ] 27 } 28 29 include_dirs = [ 30 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper", 31 "${ability_runtime_utils_path}/global/constant", 32 "${ability_runtime_innerkits_path}/ability_manager/include", 33 "${ability_runtime_innerkits_path}/app_manager/include/appmgr", 34 "${ability_runtime_services_path}/appmgr/include", 35 ] 36 37 sources = [ 38 "${ability_runtime_services_path}/appmgr/src/app_native_spawn_manager.cpp", 39 "app_native_spawn_manager_test.cpp", 40 ] 41 42 deps = [ 43 "${ability_runtime_services_path}/appmgr:libappms", 44 "${ability_runtime_innerkits_path}/app_manager:app_manager", 45 ] 46 47 external_deps = [ 48 "ability_base:base", 49 "ability_base:session_info", 50 "ability_base:configuration", 51 "ability_base:want", 52 "access_token:libaccesstoken_sdk", 53 "appspawn:appspawn_client", 54 "bundle_framework:appexecfwk_base", 55 "bundle_framework:appexecfwk_core", 56 "c_utils:utils", 57 "common_event_service:cesfwk_innerkits", 58 "ffrt:libffrt", 59 "googletest:gmock_main", 60 "googletest:gtest_main", 61 "hicollie:libhicollie", 62 "hilog:libhilog", 63 "hisysevent:libhisysevent", 64 "hitrace:hitrace_meter", 65 "init:libbeget_proxy", 66 "init:libbegetutil", 67 "ipc:ipc_core", 68 "kv_store:distributeddata_mgr", 69 "memory_utils:libmeminfo", 70 "safwk:system_ability_fwk", 71 "samgr:samgr_proxy", 72 "window_manager:libwm", 73 "window_manager:libwsutils", 74 "json:nlohmann_json_static", 75 ] 76 77 if (ability_runtime_child_process) { 78 defines = [ "SUPPORT_CHILD_PROCESS" ] 79 } 80 81} 82 83 84group("unittest") { 85 testonly = true 86 87 deps = [ ":app_native_spawn_manager_test" ] 88} 89 90