• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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
17config("ability_command_config") {
18  include_dirs = [
19    "include",
20    "${ability_runtime_innerkits_path}/app_manager/include/appmgr",
21    "${ability_runtime_services_path}/abilitymgr/include",
22  ]
23}
24
25ohos_static_library("tools_aa_source_set") {
26  sources = [
27    "src/ability_command.cpp",
28    "src/ability_tool_command.cpp",
29    "src/shell_command.cpp",
30    "src/shell_command_config_loader.cpp",
31    "src/shell_command_executor.cpp",
32    "src/shell_command_result.cpp",
33    "src/system_time.cpp",
34    "src/test_observer.cpp",
35    "src/test_observer_proxy.cpp",
36    "src/test_observer_stub.cpp",
37  ]
38
39  public_configs = [
40    ":ability_command_config",
41    "${ability_runtime_services_path}/abilitymgr:abilityms_config",
42    "${ability_runtime_services_path}/common:common_config",
43  ]
44
45  cflags = []
46  if (target_cpu == "arm") {
47    cflags += [ "-DBINDER_IPC_32BIT" ]
48  }
49
50  deps = [
51    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
52    "${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
53    "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
54    "${ability_runtime_innerkits_path}/ability_manager:mission_info",
55    "${ability_runtime_innerkits_path}/app_manager:app_manager",
56  ]
57
58  external_deps = [
59    "ability_base:base",
60    "ability_base:want",
61    "bundle_framework:appexecfwk_core",
62    "c_utils:utils",
63    "eventhandler:libeventhandler",
64    "hilog:libhilog",
65    "init:libbegetutil",
66    "ipc:ipc_core",
67  ]
68  public_external_deps = [
69    "bundle_framework:appexecfwk_base",
70    "graphic_2d:color_manager",
71    "image_framework:image_native",
72    "init:libbegetutil",
73    "jsoncpp:jsoncpp",
74    "relational_store:native_dataability",
75    "relational_store:native_rdb",
76    "samgr:samgr_proxy",
77  ]
78
79  subsystem_name = "ability"
80  part_name = "ability_runtime"
81}
82
83ohos_executable("aa") {
84  sources = [ "src/main.cpp" ]
85
86  cflags = []
87  if (target_cpu == "arm") {
88    cflags += [ "-DBINDER_IPC_32BIT" ]
89  }
90
91  deps = [ ":tools_aa_source_set" ]
92
93  external_deps = [
94    "ability_base:base",
95    "ability_base:configuration",
96    "hicollie:libhicollie",
97    "hilog:libhilog",
98    "ipc:ipc_core",
99  ]
100
101  symlink_target_name = [ "ability_tool" ]
102
103  defines = []
104
105  install_enable = true
106
107  subsystem_name = "ability"
108  part_name = "ability_runtime"
109}
110
111ohos_prebuilt_etc("shell_command_excutor_config.json") {
112  source = "resource/shell_command_excutor_config.json"
113  subsystem_name = "ability"
114  part_name = "ability_runtime"
115}
116
117group("tools_aa") {
118  deps = [
119    ":aa",
120    ":shell_command_excutor_config.json",
121  ]
122}
123