• 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("//foundation/appexecfwk/standard/appexecfwk.gni")
16
17module_output_path = "bundle_tool/tools"
18
19ohos_systemtest("bm_command_install_system_test") {
20  module_out_path = module_output_path
21
22  include_dirs = [
23    "${aafwk_path}/tools/test/systemtest/aa",
24    "//third_party/jsoncpp/include",
25  ]
26
27  sources = [
28    "${aafwk_path}/tools/test/systemtest/aa/tool_system_test.cpp",
29    "bm_command_install_system_test.cpp",
30  ]
31
32  configs = [
33    "${appexecfwk_path}/tools/bm:tools_bm_config",
34    "${appexecfwk_path}/tools/test/unittest/bm:tools_bm_config_mock",
35  ]
36
37  cflags = []
38  if (target_cpu == "arm") {
39    cflags += [ "-DBINDER_IPC_32BIT" ]
40  }
41
42  deps = [
43    "${aafwk_path}/tools/aa:tools_aa_source_set",
44    "//third_party/googletest:gtest_main",
45    "//third_party/jsoncpp:jsoncpp",
46  ]
47
48  external_deps = [
49    "hiviewdfx_hilog_native:libhilog",
50    "ipc:ipc_core",
51    "os_account_standard:os_account_innerkits",
52  ]
53  resource_config_file =
54      "//foundation/appexecfwk/standard/test/resource/tools/ohos_test.xml"
55}
56
57ohos_systemtest("bm_command_uninstall_system_test") {
58  module_out_path = module_output_path
59
60  include_dirs = [
61    "${aafwk_path}/tools/test/systemtest/aa",
62    "//third_party/jsoncpp/include",
63  ]
64
65  sources = [
66    "${aafwk_path}/tools/test/systemtest/aa/tool_system_test.cpp",
67    "bm_command_uninstall_system_test.cpp",
68  ]
69
70  configs = [
71    "${appexecfwk_path}/tools/bm:tools_bm_config",
72    "${appexecfwk_path}/tools/test/unittest/bm:tools_bm_config_mock",
73  ]
74
75  cflags = []
76  if (target_cpu == "arm") {
77    cflags += [ "-DBINDER_IPC_32BIT" ]
78  }
79
80  deps = [
81    "${aafwk_path}/tools/aa:tools_aa_source_set",
82    "//third_party/googletest:gtest_main",
83    "//third_party/jsoncpp:jsoncpp",
84  ]
85
86  external_deps = [
87    "hiviewdfx_hilog_native:libhilog",
88    "ipc:ipc_core",
89    "os_account_standard:os_account_innerkits",
90  ]
91  resource_config_file =
92      "//foundation/appexecfwk/standard/test/resource/tools/ohos_test.xml"
93}
94
95ohos_systemtest("bm_command_dump_system_test") {
96  module_out_path = module_output_path
97
98  include_dirs = [
99    "${aafwk_path}/tools/test/systemtest/aa",
100    "//third_party/jsoncpp/include",
101  ]
102
103  sources = [
104    "${aafwk_path}/tools/test/systemtest/aa/tool_system_test.cpp",
105    "bm_command_dump_system_test.cpp",
106  ]
107
108  configs = [
109    "${appexecfwk_path}/tools/bm:tools_bm_config",
110    "${appexecfwk_path}/tools/test/unittest/bm:tools_bm_config_mock",
111  ]
112
113  cflags = []
114  if (target_cpu == "arm") {
115    cflags += [ "-DBINDER_IPC_32BIT" ]
116  }
117
118  deps = [
119    "${aafwk_path}/tools/aa:tools_aa_source_set",
120    "//third_party/googletest:gtest_main",
121    "//third_party/jsoncpp:jsoncpp",
122  ]
123
124  external_deps = [
125    "hiviewdfx_hilog_native:libhilog",
126    "ipc:ipc_core",
127    "os_account_standard:os_account_innerkits",
128  ]
129  resource_config_file =
130      "//foundation/appexecfwk/standard/test/resource/tools/ohos_test.xml"
131}
132
133group("systemtest") {
134  testonly = true
135
136  deps = [
137    ":bm_command_dump_system_test",
138    ":bm_command_install_system_test",
139    ":bm_command_uninstall_system_test",
140  ]
141}
142