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