• 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/bundle_tool"
18
19config("tools_bm_config_systemtest") {
20  include_dirs = [ "${bundletool_test_path}/mock/" ]
21}
22
23ohos_systemtest("bm_command_install_system_test") {
24  module_out_path = module_output_path
25
26  sources = [
27    "bm_command_install_system_test.cpp",
28    "tool_system_test.cpp",
29  ]
30
31  deps = [
32    "${bundletool_test_path}/systemtest/bm/ohos_test:copy_ohos_test",
33    "${bundletool_test_path}/sceneProject/tools/bm/test_app_one:test_app_one",
34  ]
35
36  configs = [
37    "${bundletool_path}:tools_bm_config",
38    ":tools_bm_config_systemtest",
39  ]
40
41  cflags = []
42  if (target_cpu == "arm") {
43    cflags += [ "-DBINDER_IPC_32BIT" ]
44  }
45
46  external_deps = [
47    "ability_base:base",
48    "ability_base:configuration",
49    "ability_base:want",
50    "bundle_framework:appexecfwk_base",
51    "bundle_framework:appexecfwk_core",
52    "bundle_framework:bundle_napi_common",
53    "googletest:gtest_main",
54    "hilog:libhilog",
55    "ipc:ipc_core",
56    "os_account:os_account_innerkits",
57  ]
58
59  external_deps += bm_install_external_deps
60}
61
62ohos_systemtest("bm_command_uninstall_system_test") {
63  module_out_path = module_output_path
64
65  sources = [
66    "bm_command_uninstall_system_test.cpp",
67    "tool_system_test.cpp",
68  ]
69
70  configs = [
71    "${bundletool_path}:tools_bm_config",
72    ":tools_bm_config_systemtest",
73  ]
74
75  cflags = []
76  if (target_cpu == "arm") {
77    cflags += [ "-DBINDER_IPC_32BIT" ]
78  }
79
80  deps = [
81    "${bundletool_test_path}/systemtest/bm/ohos_test:copy_ohos_test",
82    "${bundletool_test_path}/sceneProject/tools/bm/test_app_one:test_app_one",
83  ]
84
85  external_deps = [
86    "ability_base:base",
87    "ability_base:configuration",
88    "ability_base:want",
89    "bundle_framework:appexecfwk_base",
90    "bundle_framework:appexecfwk_core",
91    "bundle_framework:bundle_napi_common",
92    "googletest:gtest_main",
93    "hilog:libhilog",
94    "ipc:ipc_core",
95    "os_account:os_account_innerkits",
96  ]
97
98  external_deps += bm_install_external_deps
99}
100
101ohos_systemtest("bm_command_dump_system_test") {
102  module_out_path = module_output_path
103
104  sources = [
105    "bm_command_dump_system_test.cpp",
106    "tool_system_test.cpp",
107  ]
108
109  configs = [
110    "${bundletool_path}:tools_bm_config",
111    ":tools_bm_config_systemtest",
112  ]
113
114  cflags = []
115  if (target_cpu == "arm") {
116    cflags += [ "-DBINDER_IPC_32BIT" ]
117  }
118
119  deps = [
120    "${bundletool_test_path}/systemtest/bm/ohos_test:copy_ohos_test",
121    "${bundletool_test_path}/sceneProject/tools/bm/test_app_one:test_app_one",
122  ]
123
124  external_deps = [
125    "ability_base:base",
126    "ability_base:configuration",
127    "ability_base:want",
128    "bundle_framework:appexecfwk_base",
129    "bundle_framework:appexecfwk_core",
130    "bundle_framework:bundle_napi_common",
131    "googletest:gtest_main",
132    "hilog:libhilog",
133    "ipc:ipc_core",
134    "os_account:os_account_innerkits",
135  ]
136
137  external_deps += bm_install_external_deps
138}
139
140group("systemtest") {
141  testonly = true
142
143  deps = [
144    ":bm_command_dump_system_test",
145    ":bm_command_install_system_test",
146    ":bm_command_uninstall_system_test",
147  ]
148}
149