1eace7efcSopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd. 2eace7efcSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3eace7efcSopenharmony_ci# you may not use this file except in compliance with the License. 4eace7efcSopenharmony_ci# You may obtain a copy of the License at 5eace7efcSopenharmony_ci# 6eace7efcSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7eace7efcSopenharmony_ci# 8eace7efcSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9eace7efcSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10eace7efcSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11eace7efcSopenharmony_ci# See the License for the specific language governing permissions and 12eace7efcSopenharmony_ci# limitations under the License. 13eace7efcSopenharmony_ci 14eace7efcSopenharmony_ciimport("//build/test.gni") 15eace7efcSopenharmony_ciimport("//foundation/ability/ability_runtime/ability_runtime.gni") 16eace7efcSopenharmony_ci 17eace7efcSopenharmony_cimodule_output_path = "ability_runtime/app" 18eace7efcSopenharmony_ci 19eace7efcSopenharmony_ciohos_unittest("AppRecoveryUnitTest") { 20eace7efcSopenharmony_ci module_out_path = module_output_path 21eace7efcSopenharmony_ci cflags_cc = [ "-DUNITTEST" ] 22eace7efcSopenharmony_ci cflags = [ "-DUNITTEST" ] 23eace7efcSopenharmony_ci include_dirs = [ 24eace7efcSopenharmony_ci "./", 25eace7efcSopenharmony_ci "mock", 26eace7efcSopenharmony_ci "${ability_runtime_path}/interfaces/kits/native/ability/native/ability_runtime", 27eace7efcSopenharmony_ci "${ability_runtime_path}/interfaces/kits/native/ability/native/ui_extension_ability", 28eace7efcSopenharmony_ci "${ability_runtime_test_path}/mock/services_appmgr_test/include", 29eace7efcSopenharmony_ci ] 30eace7efcSopenharmony_ci 31eace7efcSopenharmony_ci # push recovery source file here 32eace7efcSopenharmony_ci sources = [ "app_recovery_test.cpp" ] 33eace7efcSopenharmony_ci 34eace7efcSopenharmony_ci if (target_cpu == "arm") { 35eace7efcSopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 36eace7efcSopenharmony_ci } 37eace7efcSopenharmony_ci 38eace7efcSopenharmony_ci deps = [ 39eace7efcSopenharmony_ci "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", 40eace7efcSopenharmony_ci "${ability_runtime_native_path}/ability/native:abilitykit_native", 41eace7efcSopenharmony_ci "${ability_runtime_native_path}/ability/native:uiabilitykit_native", 42eace7efcSopenharmony_ci "${ability_runtime_native_path}/appkit:app_context", 43eace7efcSopenharmony_ci "${ability_runtime_native_path}/appkit:app_context_utils", 44eace7efcSopenharmony_ci "${ability_runtime_native_path}/appkit:appkit_delegator", 45eace7efcSopenharmony_ci "${ability_runtime_path}/utils/global/freeze:freeze_util", 46eace7efcSopenharmony_ci "${ability_runtime_services_path}/common:event_report", 47eace7efcSopenharmony_ci "${multimedia_path}/interfaces/innerkits:image_native", 48eace7efcSopenharmony_ci "${windowmanager_path}/dm:libdm", 49eace7efcSopenharmony_ci "${windowmanager_path}/interfaces/kits/napi/window_runtime:windowstage_kit", 50eace7efcSopenharmony_ci "${windowmanager_path}/wm:libwm", 51eace7efcSopenharmony_ci ] 52eace7efcSopenharmony_ci 53eace7efcSopenharmony_ci external_deps = [ 54eace7efcSopenharmony_ci "ability_base:base", 55eace7efcSopenharmony_ci "ability_base:configuration", 56eace7efcSopenharmony_ci "ability_base:want", 57eace7efcSopenharmony_ci "ability_base:zuri", 58eace7efcSopenharmony_ci "ability_runtime:ability_context_native", 59eace7efcSopenharmony_ci "ability_runtime:ability_deps_wrapper", 60eace7efcSopenharmony_ci "ability_runtime:ability_manager", 61eace7efcSopenharmony_ci "ability_runtime:napi_base_context", 62eace7efcSopenharmony_ci "ability_runtime:runtime", 63eace7efcSopenharmony_ci "ability_runtime:wantagent_innerkits", 64eace7efcSopenharmony_ci "access_token:libaccesstoken_sdk", 65eace7efcSopenharmony_ci "access_token:libtoken_callback_sdk", 66eace7efcSopenharmony_ci "bundle_framework:appexecfwk_base", 67eace7efcSopenharmony_ci "c_utils:utils", 68eace7efcSopenharmony_ci "common_event_service:cesfwk_innerkits", 69eace7efcSopenharmony_ci "eventhandler:libeventhandler", 70eace7efcSopenharmony_ci "faultloggerd:libdfx_dumpcatcher", 71eace7efcSopenharmony_ci "form_fwk:fmskit_native", 72eace7efcSopenharmony_ci "form_fwk:form_manager", 73eace7efcSopenharmony_ci "hilog:libhilog", 74eace7efcSopenharmony_ci "hisysevent:libhisysevent", 75eace7efcSopenharmony_ci "hitrace:hitrace_meter", 76eace7efcSopenharmony_ci "ipc:ipc_core", 77eace7efcSopenharmony_ci "napi:ace_napi", 78eace7efcSopenharmony_ci ] 79eace7efcSopenharmony_ci if (hichecker_enabled) { 80eace7efcSopenharmony_ci external_deps += [ "hichecker:libhichecker" ] 81eace7efcSopenharmony_ci } 82eace7efcSopenharmony_ci} 83eace7efcSopenharmony_ci 84eace7efcSopenharmony_ciohos_unittest("AbilityRecoveryUnitTest") { 85eace7efcSopenharmony_ci module_out_path = module_output_path 86eace7efcSopenharmony_ci cflags_cc = [ "-DUNITTEST" ] 87eace7efcSopenharmony_ci cflags = [ "-DUNITTEST" ] 88eace7efcSopenharmony_ci include_dirs = [ 89eace7efcSopenharmony_ci "./", 90eace7efcSopenharmony_ci "./mock", 91eace7efcSopenharmony_ci "${ability_runtime_test_path}/mock/services_appmgr_test/include", 92eace7efcSopenharmony_ci ] 93eace7efcSopenharmony_ci 94eace7efcSopenharmony_ci # push recovery source file here 95eace7efcSopenharmony_ci sources = [ "ability_recovery_test.cpp" ] 96eace7efcSopenharmony_ci 97eace7efcSopenharmony_ci if (target_cpu == "arm") { 98eace7efcSopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 99eace7efcSopenharmony_ci } 100eace7efcSopenharmony_ci 101eace7efcSopenharmony_ci deps = [ 102eace7efcSopenharmony_ci "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", 103eace7efcSopenharmony_ci "${ability_runtime_native_path}/ability/native:abilitykit_native", 104eace7efcSopenharmony_ci "${ability_runtime_native_path}/ability/native:uiabilitykit_native", 105eace7efcSopenharmony_ci "${ability_runtime_native_path}/appkit:app_context", 106eace7efcSopenharmony_ci "${ability_runtime_native_path}/appkit:app_context_utils", 107eace7efcSopenharmony_ci "${ability_runtime_native_path}/appkit:appkit_delegator", 108eace7efcSopenharmony_ci "${ability_runtime_services_path}/common:event_report", 109eace7efcSopenharmony_ci "${multimedia_path}/interfaces/innerkits:image_native", 110eace7efcSopenharmony_ci "${windowmanager_path}/dm:libdm", 111eace7efcSopenharmony_ci "${windowmanager_path}/interfaces/kits/napi/window_runtime:windowstage_kit", 112eace7efcSopenharmony_ci "${windowmanager_path}/wm:libwm", 113eace7efcSopenharmony_ci ] 114eace7efcSopenharmony_ci 115eace7efcSopenharmony_ci external_deps = [ 116eace7efcSopenharmony_ci "ability_base:base", 117eace7efcSopenharmony_ci "ability_base:configuration", 118eace7efcSopenharmony_ci "ability_base:want", 119eace7efcSopenharmony_ci "ability_base:zuri", 120eace7efcSopenharmony_ci "ability_runtime:ability_context_native", 121eace7efcSopenharmony_ci "ability_runtime:ability_deps_wrapper", 122eace7efcSopenharmony_ci "ability_runtime:ability_manager", 123eace7efcSopenharmony_ci "ability_runtime:napi_base_context", 124eace7efcSopenharmony_ci "ability_runtime:runtime", 125eace7efcSopenharmony_ci "ability_runtime:wantagent_innerkits", 126eace7efcSopenharmony_ci "access_token:libaccesstoken_sdk", 127eace7efcSopenharmony_ci "access_token:libtoken_callback_sdk", 128eace7efcSopenharmony_ci "bundle_framework:appexecfwk_base", 129eace7efcSopenharmony_ci "c_utils:utils", 130eace7efcSopenharmony_ci "common_event_service:cesfwk_innerkits", 131eace7efcSopenharmony_ci "eventhandler:libeventhandler", 132eace7efcSopenharmony_ci "faultloggerd:libdfx_dumpcatcher", 133eace7efcSopenharmony_ci "form_fwk:fmskit_native", 134eace7efcSopenharmony_ci "form_fwk:form_manager", 135eace7efcSopenharmony_ci "hilog:libhilog", 136eace7efcSopenharmony_ci "hisysevent:libhisysevent", 137eace7efcSopenharmony_ci "hitrace:hitrace_meter", 138eace7efcSopenharmony_ci "ipc:ipc_core", 139eace7efcSopenharmony_ci "napi:ace_napi", 140eace7efcSopenharmony_ci ] 141eace7efcSopenharmony_ci if (hichecker_enabled) { 142eace7efcSopenharmony_ci external_deps += [ "hichecker:libhichecker" ] 143eace7efcSopenharmony_ci } 144eace7efcSopenharmony_ci} 145eace7efcSopenharmony_ci 146eace7efcSopenharmony_cigroup("unittest") { 147eace7efcSopenharmony_ci testonly = true 148eace7efcSopenharmony_ci 149eace7efcSopenharmony_ci deps = [ 150eace7efcSopenharmony_ci ":AbilityRecoveryUnitTest", 151eace7efcSopenharmony_ci ":AppRecoveryUnitTest", 152eace7efcSopenharmony_ci ] 153eace7efcSopenharmony_ci} 154