• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2023 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("../../../bundletool.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  sources = [
23    "bm_command_install_system_test.cpp",
24    "tool_system_test.cpp",
25  ]
26
27  configs = [
28    "${bundletool_path}:tools_bm_config",
29    "${bundletool_test_path}/unittest/bm:tools_bm_config_mock",
30  ]
31
32  cflags = []
33  if (target_cpu == "arm") {
34    cflags += [ "-DBINDER_IPC_32BIT" ]
35  }
36
37  deps = [
38    "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForInstall:pageAbilityBundleForInstall",
39    "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForUninstall:pageAbilityBundleForUninstall",
40    "${bundle_framework_path}/test/sceneProject/tools/ohos_test:copy_ohos_test",
41    "//third_party/googletest:gtest_main",
42  ]
43
44  external_deps = [
45    "ability_base:base",
46    "ability_base:configuration",
47    "ability_base:want",
48    "bundle_framework:appexecfwk_core",
49    "hilog:libhilog",
50    "ipc:ipc_core",
51    "os_account:os_account_innerkits",
52  ]
53
54  external_deps += bm_install_external_deps
55}
56
57ohos_systemtest("bm_command_uninstall_system_test") {
58  module_out_path = module_output_path
59
60  sources = [
61    "bm_command_uninstall_system_test.cpp",
62    "tool_system_test.cpp",
63  ]
64
65  configs = [
66    "${bundletool_path}:tools_bm_config",
67    "${bundletool_test_path}/unittest/bm:tools_bm_config_mock",
68  ]
69
70  cflags = []
71  if (target_cpu == "arm") {
72    cflags += [ "-DBINDER_IPC_32BIT" ]
73  }
74
75  deps = [
76    "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForInstall:pageAbilityBundleForInstall",
77    "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForUninstall:pageAbilityBundleForUninstall",
78    "${bundle_framework_path}/test/sceneProject/tools/ohos_test:copy_ohos_test",
79    "//third_party/googletest:gtest_main",
80  ]
81
82  external_deps = [
83    "ability_base:base",
84    "ability_base:configuration",
85    "ability_base:want",
86    "bundle_framework:appexecfwk_core",
87    "hilog:libhilog",
88    "ipc:ipc_core",
89    "os_account:os_account_innerkits",
90  ]
91
92  external_deps += bm_install_external_deps
93}
94
95ohos_systemtest("bm_command_dump_system_test") {
96  module_out_path = module_output_path
97
98  sources = [
99    "bm_command_dump_system_test.cpp",
100    "tool_system_test.cpp",
101  ]
102
103  configs = [
104    "${bundletool_path}:tools_bm_config",
105    "${bundletool_test_path}/unittest/bm:tools_bm_config_mock",
106  ]
107
108  cflags = []
109  if (target_cpu == "arm") {
110    cflags += [ "-DBINDER_IPC_32BIT" ]
111  }
112
113  deps = [
114    "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForInstall:pageAbilityBundleForInstall",
115    "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForUninstall:pageAbilityBundleForUninstall",
116    "${bundle_framework_path}/test/sceneProject/tools/ohos_test:copy_ohos_test",
117    "//third_party/googletest:gtest_main",
118  ]
119
120  external_deps = [
121    "ability_base:base",
122    "ability_base:configuration",
123    "ability_base:want",
124    "bundle_framework:appexecfwk_core",
125    "hilog:libhilog",
126    "ipc:ipc_core",
127    "os_account:os_account_innerkits",
128  ]
129
130  external_deps += bm_install_external_deps
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