• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("../../../../os_account.gni")
16
17module_output_path = "os_account/tools"
18
19ohos_moduletest("account_command_create_module_test") {
20  module_out_path = module_output_path
21
22  include_dirs = [
23    "${ability_runtime_path}/tools/aa/include",
24    "${ability_runtime_path}/tools/test/systemtest/aa",
25  ]
26
27  sources = [
28    "${ability_runtime_path}/tools/aa/src/shell_command.cpp",
29    "${ability_runtime_path}/tools/test/systemtest/aa/tool_system_test.cpp",
30    "${tools_path}/acm/src/account_command.cpp",
31    "account_command_create_module_test.cpp",
32    "account_command_util.cpp",
33  ]
34
35  configs = [
36    "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config",
37    "${tools_path}/acm:tools_acm_config",
38  ]
39
40  cflags = []
41  if (target_cpu == "arm") {
42    cflags += [ "-DBINDER_IPC_32BIT" ]
43  }
44
45  deps = [
46    "${common_path}:libaccount_common",
47    "${os_account_innerkits_native_path}:os_account_innerkits",
48    "//third_party/googletest:gtest_main",
49  ]
50
51  external_deps = [
52    "ability_base:base",
53    "c_utils:utils",
54    "hilog:libhilog",
55    "ipc:ipc_single",
56    "os_account:os_account_innerkits",
57  ]
58}
59
60ohos_moduletest("account_command_delete_module_test") {
61  module_out_path = module_output_path
62
63  include_dirs = [
64    "${ability_runtime_path}/tools/aa/include",
65    "${ability_runtime_path}/tools/test/systemtest/aa",
66  ]
67
68  sources = [
69    "${ability_runtime_path}/tools/aa/src/shell_command.cpp",
70    "${ability_runtime_path}/tools/test/systemtest/aa/tool_system_test.cpp",
71    "${tools_path}/acm/src/account_command.cpp",
72    "account_command_delete_module_test.cpp",
73    "account_command_util.cpp",
74  ]
75
76  configs = [
77    "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config",
78    "${tools_path}/acm:tools_acm_config",
79  ]
80
81  cflags = []
82  if (target_cpu == "arm") {
83    cflags += [ "-DBINDER_IPC_32BIT" ]
84  }
85
86  deps = [
87    "${common_path}:libaccount_common",
88    "${os_account_innerkits_native_path}:os_account_innerkits",
89    "//third_party/googletest:gtest_main",
90  ]
91
92  external_deps = [
93    "ability_base:base",
94    "c_utils:utils",
95    "hilog:libhilog",
96    "ipc:ipc_single",
97    "os_account:os_account_innerkits",
98  ]
99}
100
101ohos_moduletest("account_command_dump_module_test") {
102  module_out_path = module_output_path
103
104  include_dirs = [
105    "${ability_runtime_path}/tools/aa/include",
106    "${ability_runtime_path}/tools/test/systemtest/aa",
107  ]
108
109  sources = [
110    "${ability_runtime_path}/tools/aa/src/shell_command.cpp",
111    "${ability_runtime_path}/tools/test/systemtest/aa/tool_system_test.cpp",
112    "${tools_path}/acm/src/account_command.cpp",
113    "account_command_dump_module_test.cpp",
114    "account_command_util.cpp",
115  ]
116
117  configs = [
118    "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config",
119    "${tools_path}/acm:tools_acm_config",
120  ]
121
122  cflags = []
123  if (target_cpu == "arm") {
124    cflags += [ "-DBINDER_IPC_32BIT" ]
125  }
126
127  deps = [
128    "${common_path}:libaccount_common",
129    "${os_account_innerkits_native_path}:os_account_innerkits",
130    "//third_party/googletest:gtest_main",
131  ]
132
133  external_deps = [
134    "ability_base:base",
135    "c_utils:utils",
136    "hilog:libhilog",
137    "ipc:ipc_single",
138    "os_account:os_account_innerkits",
139  ]
140}
141
142ohos_moduletest("account_command_set_module_test") {
143  module_out_path = module_output_path
144
145  include_dirs = [
146    "${ability_runtime_path}/tools/aa/include",
147    "${ability_runtime_path}/tools/test/systemtest/aa",
148  ]
149
150  sources = [
151    "${ability_runtime_path}/tools/aa/src/shell_command.cpp",
152    "${ability_runtime_path}/tools/test/systemtest/aa/tool_system_test.cpp",
153    "${tools_path}/acm/src/account_command.cpp",
154    "account_command_set_module_test.cpp",
155    "account_command_util.cpp",
156  ]
157
158  configs = [
159    "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config",
160    "${tools_path}/acm:tools_acm_config",
161  ]
162
163  cflags = []
164  if (target_cpu == "arm") {
165    cflags += [ "-DBINDER_IPC_32BIT" ]
166  }
167
168  deps = [
169    "${common_path}:libaccount_common",
170    "${os_account_innerkits_native_path}:os_account_innerkits",
171    "//third_party/googletest:gtest_main",
172  ]
173
174  external_deps = [
175    "ability_base:base",
176    "c_utils:utils",
177    "hilog:libhilog",
178    "ipc:ipc_single",
179    "os_account:os_account_innerkits",
180  ]
181}
182
183ohos_moduletest("account_command_switch_module_test") {
184  module_out_path = module_output_path
185
186  include_dirs = [
187    "${ability_runtime_path}/tools/aa/include",
188    "${ability_runtime_path}/tools/test/systemtest/aa",
189  ]
190
191  sources = [
192    "${ability_runtime_path}/tools/aa/src/shell_command.cpp",
193    "${ability_runtime_path}/tools/test/systemtest/aa/tool_system_test.cpp",
194    "${tools_path}/acm/src/account_command.cpp",
195    "account_command_switch_module_test.cpp",
196    "account_command_util.cpp",
197  ]
198
199  configs = [
200    "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config",
201    "${tools_path}/acm:tools_acm_config",
202  ]
203
204  cflags = []
205  if (target_cpu == "arm") {
206    cflags += [ "-DBINDER_IPC_32BIT" ]
207  }
208
209  deps = [
210    "${common_path}:libaccount_common",
211    "${os_account_innerkits_native_path}:os_account_innerkits",
212    "//third_party/googletest:gtest_main",
213  ]
214
215  external_deps = [
216    "ability_base:base",
217    "c_utils:utils",
218    "hilog:libhilog",
219    "ipc:ipc_single",
220    "os_account:os_account_innerkits",
221  ]
222}
223
224group("moduletest") {
225  testonly = true
226
227  deps = [
228    ":account_command_create_module_test",
229    ":account_command_delete_module_test",
230    ":account_command_dump_module_test",
231    ":account_command_set_module_test",
232    ":account_command_switch_module_test",
233  ]
234}
235