• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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/aafwk/standard/aafwk.gni")
16
17module_output_path = "ability_tools/tools"
18
19config("tools_aa_test_config") {
20  include_dirs = [
21    "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base/include",
22    "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core/include/bundlemgr",
23    "${appexecfwk_path}/tools/bm/include",
24    "//utils/system/safwk/native/include",
25    "//base/security/permission/interfaces/innerkits/permission_standard/permissionsdk/main/cpp/include",
26    "//base/security/appverify/interfaces/innerkits/appverify/include",
27  ]
28}
29
30ohos_systemtest("aa_command_start_system_test") {
31  module_out_path = module_output_path
32
33  include_dirs = [ "//third_party/jsoncpp/include" ]
34
35  sources = [
36    "aa_command_start_system_test.cpp",
37    "tool_system_test.cpp",
38  ]
39
40  configs = [ ":tools_aa_test_config" ]
41
42  cflags = []
43  if (target_cpu == "arm") {
44    cflags += [ "-DBINDER_IPC_32BIT" ]
45  }
46
47  deps = [
48    "${aafwk_path}/tools/aa:tools_aa_source_set",
49    "//third_party/googletest:gtest_main",
50    "//third_party/jsoncpp:jsoncpp",
51  ]
52
53  external_deps = [
54    "bundle_framework:appexecfwk_base",
55    "hiviewdfx_hilog_native:libhilog",
56    "ipc:ipc_core",
57  ]
58}
59
60ohos_systemtest("aa_command_stop_service_system_test") {
61  module_out_path = module_output_path
62
63  sources = [
64    "aa_command_stop_service_system_test.cpp",
65    "tool_system_test.cpp",
66  ]
67
68  configs = [ ":tools_aa_test_config" ]
69
70  cflags = []
71  if (target_cpu == "arm") {
72    cflags += [ "-DBINDER_IPC_32BIT" ]
73  }
74
75  deps = [
76    "${aafwk_path}/tools/aa:tools_aa_source_set",
77    "//third_party/googletest:gtest_main",
78    "//third_party/jsoncpp:jsoncpp",
79  ]
80
81  external_deps = [
82    "bundle_framework:appexecfwk_base",
83    "hiviewdfx_hilog_native:libhilog",
84    "ipc:ipc_core",
85  ]
86}
87
88ohos_systemtest("aa_command_dump_system_test") {
89  module_out_path = module_output_path
90
91  include_dirs = [ "//third_party/jsoncpp/include" ]
92
93  sources = [
94    "aa_command_dump_system_test.cpp",
95    "tool_system_test.cpp",
96  ]
97
98  configs = [ ":tools_aa_test_config" ]
99
100  cflags = []
101  if (target_cpu == "arm") {
102    cflags += [ "-DBINDER_IPC_32BIT" ]
103  }
104
105  deps = [
106    "${aafwk_path}/tools/aa:tools_aa_source_set",
107    "//third_party/googletest:gtest_main",
108    "//third_party/jsoncpp:jsoncpp",
109  ]
110
111  external_deps = [
112    "bundle_framework:appexecfwk_base",
113    "hiviewdfx_hilog_native:libhilog",
114    "ipc:ipc_core",
115  ]
116}
117
118group("systemtest") {
119  testonly = true
120
121  deps = [
122    ":aa_command_dump_system_test",
123    ":aa_command_start_system_test",
124    ":aa_command_stop_service_system_test",
125  ]
126}
127