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/app" 18 19ohos_unittest("AppRecoveryUnitTest") { 20 module_out_path = module_output_path 21 cflags_cc = [ "-DUNITTEST" ] 22 cflags = [ "-DUNITTEST" ] 23 include_dirs = [ 24 "./", 25 "mock", 26 "${ability_runtime_test_path}/mock/services_appmgr_test/include", 27 ] 28 29 # push recovery source file here 30 sources = [ "app_recovery_test.cpp" ] 31 32 if (target_cpu == "arm") { 33 cflags += [ "-DBINDER_IPC_32BIT" ] 34 } 35 36 deps = [ 37 "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", 38 "${ability_runtime_native_path}/ability/native:abilitykit_native", 39 "${ability_runtime_native_path}/appkit:app_context", 40 "${ability_runtime_native_path}/appkit:app_context_utils", 41 "${ability_runtime_native_path}/appkit:appkit_delegator", 42 "${ability_runtime_services_path}/common:event_report", 43 "${multimedia_path}/interfaces/innerkits:image_native", 44 "${windowmanager_path}/dm:libdm", 45 "${windowmanager_path}/interfaces/kits/napi/window_runtime:windowstage_kit", 46 "${windowmanager_path}/wm:libwm", 47 ] 48 49 external_deps = [ 50 "ability_base:base", 51 "ability_base:configuration", 52 "ability_base:want", 53 "ability_base:zuri", 54 "ability_runtime:ability_context_native", 55 "ability_runtime:ability_deps_wrapper", 56 "ability_runtime:ability_manager", 57 "ability_runtime:napi_base_context", 58 "ability_runtime:runtime", 59 "ability_runtime:wantagent_innerkits", 60 "access_token:libaccesstoken_sdk", 61 "access_token:libtoken_callback_sdk", 62 "bundle_framework:appexecfwk_base", 63 "c_utils:utils", 64 "common_event_service:cesfwk_innerkits", 65 "eventhandler:libeventhandler", 66 "faultloggerd:libdfx_dumpcatcher", 67 "form_fwk:fmskit_native", 68 "form_fwk:form_manager", 69 "hichecker:libhichecker", 70 "hilog:libhilog", 71 "hisysevent:libhisysevent", 72 "hitrace:hitrace_meter", 73 "ipc:ipc_core", 74 "napi:ace_napi", 75 ] 76} 77 78ohos_unittest("AbilityRecoveryUnitTest") { 79 module_out_path = module_output_path 80 cflags_cc = [ "-DUNITTEST" ] 81 cflags = [ "-DUNITTEST" ] 82 include_dirs = [ 83 "./", 84 "./mock", 85 "${ability_runtime_test_path}/mock/services_appmgr_test/include", 86 ] 87 88 # push recovery source file here 89 sources = [ "ability_recovery_test.cpp" ] 90 91 if (target_cpu == "arm") { 92 cflags += [ "-DBINDER_IPC_32BIT" ] 93 } 94 95 deps = [ 96 "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", 97 "${ability_runtime_native_path}/ability/native:abilitykit_native", 98 "${ability_runtime_native_path}/appkit:app_context", 99 "${ability_runtime_native_path}/appkit:app_context_utils", 100 "${ability_runtime_native_path}/appkit:appkit_delegator", 101 "${ability_runtime_services_path}/common:event_report", 102 "${multimedia_path}/interfaces/innerkits:image_native", 103 "${windowmanager_path}/dm:libdm", 104 "${windowmanager_path}/interfaces/kits/napi/window_runtime:windowstage_kit", 105 "${windowmanager_path}/wm:libwm", 106 ] 107 108 external_deps = [ 109 "ability_base:base", 110 "ability_base:configuration", 111 "ability_base:want", 112 "ability_base:zuri", 113 "ability_runtime:ability_context_native", 114 "ability_runtime:ability_deps_wrapper", 115 "ability_runtime:ability_manager", 116 "ability_runtime:napi_base_context", 117 "ability_runtime:runtime", 118 "ability_runtime:wantagent_innerkits", 119 "access_token:libaccesstoken_sdk", 120 "access_token:libtoken_callback_sdk", 121 "bundle_framework:appexecfwk_base", 122 "c_utils:utils", 123 "common_event_service:cesfwk_innerkits", 124 "eventhandler:libeventhandler", 125 "faultloggerd:libdfx_dumpcatcher", 126 "form_fwk:fmskit_native", 127 "form_fwk:form_manager", 128 "hichecker:libhichecker", 129 "hilog:libhilog", 130 "hisysevent:libhisysevent", 131 "hitrace:hitrace_meter", 132 "ipc:ipc_core", 133 "napi:ace_napi", 134 ] 135} 136 137group("unittest") { 138 testonly = true 139 140 deps = [ 141 ":AbilityRecoveryUnitTest", 142 ":AppRecoveryUnitTest", 143 ] 144} 145