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