1# Copyright (c) 2022 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/mstabilitymgrservice" 18 19ohos_moduletest("running_infos_module_test") { 20 module_out_path = module_output_path 21 cflags_cc = [] 22 include_dirs = [ 23 "${ability_runtime_test_path}/moduletest/mock/include", 24 "${ability_runtime_test_path}/mock/common/include", 25 "//third_party/jsoncpp/include", 26 "${ability_runtime_path}/interfaces/kits/native/ability/native/distributed_ability_runtime", 27 "${ability_runtime_innerkits_path}/dataobs_manager/include", 28 ] 29 30 sources = [ "running_infos_module_test.cpp" ] 31 sources += [ 32 "${ability_runtime_services_path}/abilitymgr/src/ability_manager_service.cpp", 33 "${ability_runtime_test_path}/mock/common/src/mock_native_token.cpp", 34 "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/sa_mgr/src/sa_mgr_client_mock.cpp", 35 "${ability_runtime_test_path}/moduletest/mock/src/mock_app_mgr_client.cpp", 36 "${ability_runtime_test_path}/moduletest/mock/src/mock_bundle_mgr.cpp", 37 ] 38 39 configs = [ 40 "${ability_runtime_test_path}/moduletest:aafwk_module_test_config", 41 "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", 42 "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/sa_mgr:sa_mgr_mock_config", 43 "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", 44 ] 45 cflags = [] 46 if (target_cpu == "arm") { 47 cflags += [ "-DBINDER_IPC_32BIT" ] 48 } 49 deps = [ 50 "${ability_runtime_innerkits_path}/app_manager:app_manager", 51 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 52 "${ability_runtime_native_path}/ability/native:abilitykit_native", 53 "${ability_runtime_services_path}/abilitymgr:abilityms", 54 "${ability_runtime_services_path}/common:event_report", 55 "${ability_runtime_services_path}/common:perm_verification", 56 "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", 57 "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 58 "//third_party/googletest:gmock_main", 59 "//third_party/googletest:gtest_main", 60 "//third_party/icu/icu4c:shared_icuuc", 61 "//third_party/jsoncpp:jsoncpp", 62 ] 63 64 if (ability_runtime_graphics) { 65 deps += [ 66 "${ace_engine_path}/interfaces/inner_api/ui_service_manager:ui_service_mgr", 67 "${global_path}/i18n/frameworks/intl:intl_util", 68 "${multimedia_path}/interfaces/innerkits:image_native", 69 "//third_party/icu/icu4c:shared_icuuc", 70 ] 71 } 72 73 external_deps = [ 74 "ability_base:configuration", 75 "ability_base:want", 76 "ability_base:zuri", 77 "ability_runtime:ability_deps_wrapper", 78 "access_token:libaccesstoken_sdk", 79 "access_token:libnativetoken", 80 "access_token:libtoken_setproc", 81 "bundle_framework:appexecfwk_base", 82 "bundle_framework:appexecfwk_core", 83 "c_utils:utils", 84 "common_event_service:cesfwk_core", 85 "common_event_service:cesfwk_innerkits", 86 "dsoftbus:softbus_client", 87 "hicollie_native:libhicollie", 88 "hisysevent_native:libhisysevent", 89 "hitrace_native:hitrace_meter", 90 "hiviewdfx_hilog_native:libhilog", 91 "init:libbeget_proxy", 92 "init:libbegetutil", 93 "ipc:ipc_core", 94 "relational_store:native_appdatafwk", 95 "relational_store:native_dataability", 96 "relational_store:native_rdb", 97 ] 98 99 if (efficiency_manager) { 100 cflags_cc += [ "-DEFFICIENCY_MANAGER_ENABLE" ] 101 external_deps += [ "efficiency_manager:suspend_manager_client" ] 102 } 103 104 if (resource_schedule_service_enable) { 105 cflags_cc += [ "-RESOURCE_SCHEDULE_SERVICE_ENABLE" ] 106 external_deps += [ "resource_schedule_service:ressched_client" ] 107 } 108 109 if (background_task_mgr_continuous_task_enable) { 110 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 111 } 112 113 if (ability_runtime_graphics) { 114 external_deps += [ 115 "input:libmmi-client", 116 "window_manager:libdm", 117 ] 118 } 119} 120 121group("moduletest") { 122 testonly = true 123 124 deps = [ ":running_infos_module_test" ] 125} 126