• 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  ]
53}
54
55ohos_systemtest("aa_command_stop_service_system_test") {
56  module_out_path = module_output_path
57
58  sources = [
59    "aa_command_stop_service_system_test.cpp",
60    "tool_system_test.cpp",
61  ]
62
63  configs = [ ":tools_aa_test_config" ]
64
65  cflags = []
66  if (target_cpu == "arm") {
67    cflags += [ "-DBINDER_IPC_32BIT" ]
68  }
69
70  deps = [
71    "${ability_runtime_path}/tools/aa:tools_aa_source_set",
72    "${ability_runtime_path}/tools/test/resource/aa/serviceAbilityBundleForStop:serviceAbilityBundleForStop",
73    "${ability_runtime_path}/tools/test/resource/ohos_test:copy_ohos_test",
74  ]
75
76  external_deps = [
77    "ability_base:base",
78    "ability_base:configuration",
79    "bundle_framework:appexecfwk_base",
80    "googletest:gtest_main",
81    "hilog:libhilog",
82    "ipc:ipc_core",
83  ]
84}
85
86ohos_systemtest("aa_command_dump_system_test") {
87  module_out_path = module_output_path
88
89  sources = [
90    "aa_command_dump_system_test.cpp",
91    "tool_system_test.cpp",
92  ]
93
94  configs = [ ":tools_aa_test_config" ]
95
96  cflags = []
97  if (target_cpu == "arm") {
98    cflags += [ "-DBINDER_IPC_32BIT" ]
99  }
100
101  deps = [
102    "${ability_runtime_path}/tools/aa:tools_aa_source_set",
103    "${ability_runtime_path}/tools/test/resource/aa/dataAbilityBundleForDump:dataAbilityBundleForDump",
104    "${ability_runtime_path}/tools/test/resource/aa/pageAbilityBundleForDump:pageAbilityBundleForDump",
105    "${ability_runtime_path}/tools/test/resource/aa/serviceAbilityBundleForStart:serviceAbilityBundleForStart",
106    "${ability_runtime_path}/tools/test/resource/ohos_test:copy_ohos_test",
107  ]
108
109  external_deps = [
110    "ability_base:base",
111    "ability_base:configuration",
112    "bundle_framework:appexecfwk_base",
113    "googletest:gtest_main",
114    "hilog:libhilog",
115    "ipc:ipc_core",
116  ]
117}
118
119group("systemtest") {
120  testonly = true
121
122  deps = [
123    ":aa_command_dump_system_test",
124    ":aa_command_start_system_test",
125    ":aa_command_stop_service_system_test",
126  ]
127}
128