1# Copyright (c) 2021 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. 13import("//build/test.gni") 14import("//foundation/appexecfwk/standard/appexecfwk.gni") 15 16module_output_path = "appexecfwk_standard/ams" 17ohos_systemtest("ams_kit_test") { 18 module_out_path = module_output_path 19 include_dirs = [ 20 "${appexecfwk_path}/test/resource/amssystemtestability/abilitySrc/common/", 21 "${appexecfwk_path}/test/systemtest/common/ams/tool/include", 22 "//foundation/distributedschedule/safwk/services/safwk/include", 23 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/include", 24 "//base/notification/ces_standard/test/systemtest/common/resource", 25 "//third_party/jsoncpp/include", 26 ] 27 sources = [ 28 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/event.cpp", 29 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/module_test_dump_util.cpp", 30 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/stoperator.cpp", 31 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/system_test_ability_util.cpp", 32 "acts_ams_kit_test.cpp", 33 ] 34 configs = [ 35 "${aafwk_path}/services/abilitymgr:abilityms_config", 36 "${appexecfwk_path}/services/appmgr:appmgr_config", 37 ] 38 cflags = [] 39 if (target_cpu == "arm") { 40 cflags += [ "-DBINDER_IPC_32BIT" ] 41 } 42 deps = [ 43 "${aafwk_path}/interfaces/innerkits/want:want", 44 "${aafwk_path}/services/abilitymgr:abilityms", 45 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base:appexecfwk_base", 46 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core:appexecfwk_core", 47 "${appexecfwk_path}/interfaces/innerkits/libeventhandler:libeventhandler", 48 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 49 "//third_party/googletest:gtest_main", 50 "//third_party/jsoncpp:jsoncpp", 51 "//utils/native/base:utils", 52 ] 53 external_deps = [ 54 "ces_standard:cesfwk_core", 55 "ces_standard:cesfwk_innerkits", 56 "hiviewdfx_hilog_native:libhilog", 57 "ipc:ipc_core", 58 ] 59} 60 61ohos_systemtest("ams_kit_service_ability_test") { 62 module_out_path = module_output_path 63 include_dirs = [ 64 "${appexecfwk_path}/test/systemtest/common/ams/tool/include", 65 "//foundation/distributedschedule/safwk/services/safwk/include", 66 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/include", 67 "//base/notification/ces_standard/test/systemtest/common/resource", 68 "//third_party/jsoncpp/include", 69 ] 70 sources = [ 71 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/event.cpp", 72 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/module_test_dump_util.cpp", 73 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/stoperator.cpp", 74 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/system_test_ability_util.cpp", 75 "acts_ams_kit_service_ability_test.cpp", 76 ] 77 configs = [ 78 "${aafwk_path}/services/abilitymgr:abilityms_config", 79 "${appexecfwk_path}/services/appmgr:appmgr_config", 80 ] 81 cflags = [] 82 if (target_cpu == "arm") { 83 cflags += [ "-DBINDER_IPC_32BIT" ] 84 } 85 deps = [ 86 "${aafwk_path}/interfaces/innerkits/want:want", 87 "${aafwk_path}/services/abilitymgr:abilityms", 88 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base:appexecfwk_base", 89 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core:appexecfwk_core", 90 "${appexecfwk_path}/interfaces/innerkits/libeventhandler:libeventhandler", 91 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 92 "//third_party/googletest:gtest_main", 93 "//third_party/jsoncpp:jsoncpp", 94 "//utils/native/base:utils", 95 ] 96 external_deps = [ 97 "ces_standard:cesfwk_core", 98 "ces_standard:cesfwk_innerkits", 99 "hiviewdfx_hilog_native:libhilog", 100 "ipc:ipc_core", 101 ] 102} 103 104ohos_systemtest("ams_kit_data_test") { 105 module_out_path = module_output_path 106 include_dirs = [ 107 "${appexecfwk_path}/test/systemtest/common/ams/tool/include", 108 "//foundation/distributedschedule/safwk/services/safwk/include", 109 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/include", 110 "//base/notification/ces_standard/test/systemtest/common/resource", 111 "//third_party/jsoncpp/include", 112 ] 113 sources = [ 114 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/event.cpp", 115 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/module_test_dump_util.cpp", 116 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/stoperator.cpp", 117 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/system_test_ability_util.cpp", 118 "acts_ams_kit_data_test.cpp", 119 ] 120 configs = [ 121 "${aafwk_path}/services/abilitymgr:abilityms_config", 122 "${appexecfwk_path}/services/appmgr:appmgr_config", 123 ] 124 cflags = [] 125 if (target_cpu == "arm") { 126 cflags += [ "-DBINDER_IPC_32BIT" ] 127 } 128 deps = [ 129 "${aafwk_path}/frameworks/kits/ability/native:abilitykit_native", 130 "${aafwk_path}/frameworks/kits/ability/native:dummy_classes", 131 "${aafwk_path}/interfaces/innerkits/want:want", 132 "${aafwk_path}/services/abilitymgr:abilityms", 133 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base:appexecfwk_base", 134 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core:appexecfwk_core", 135 "${appexecfwk_path}/interfaces/innerkits/libeventhandler:libeventhandler", 136 "//foundation/distributedschedule/dmsfwk/interfaces/innerkits/uri:zuri", 137 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 138 "//third_party/googletest:gtest_main", 139 "//third_party/jsoncpp:jsoncpp", 140 "//utils/native/base:utils", 141 ] 142 external_deps = [ 143 "ces_standard:cesfwk_core", 144 "ces_standard:cesfwk_innerkits", 145 "hiviewdfx_hilog_native:libhilog", 146 "ipc:ipc_core", 147 ] 148} 149 150ohos_systemtest("ams_kit_a_test") { 151 module_out_path = module_output_path 152 include_dirs = [ 153 "${appexecfwk_path}/test/resource/amssystemtestability/abilitySrc/common/", 154 "${appexecfwk_path}/test/systemtest/common/ams/tool/include", 155 "//foundation/distributedschedule/safwk/services/safwk/include", 156 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/include", 157 "//base/notification/ces_standard/test/systemtest/common/resource", 158 "//third_party/jsoncpp/include", 159 ] 160 sources = [ 161 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/event.cpp", 162 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/module_test_dump_util.cpp", 163 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/stoperator.cpp", 164 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/system_test_ability_util.cpp", 165 "acts_ams_kit_a_test.cpp", 166 ] 167 configs = [ 168 "${aafwk_path}/services/abilitymgr:abilityms_config", 169 "${appexecfwk_path}/services/appmgr:appmgr_config", 170 ] 171 cflags = [] 172 if (target_cpu == "arm") { 173 cflags += [ "-DBINDER_IPC_32BIT" ] 174 } 175 deps = [ 176 "${aafwk_path}/interfaces/innerkits/want:want", 177 "${aafwk_path}/services/abilitymgr:abilityms", 178 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base:appexecfwk_base", 179 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core:appexecfwk_core", 180 "${appexecfwk_path}/interfaces/innerkits/libeventhandler:libeventhandler", 181 "//foundation/distributedschedule/dmsfwk/interfaces/innerkits/uri:zuri", 182 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 183 "//third_party/googletest:gtest_main", 184 "//third_party/jsoncpp:jsoncpp", 185 "//utils/native/base:utils", 186 ] 187 external_deps = [ 188 "ces_standard:cesfwk_core", 189 "ces_standard:cesfwk_innerkits", 190 "hiviewdfx_hilog_native:libhilog", 191 "ipc:ipc_core", 192 ] 193} 194 195ohos_systemtest("ams_kit_want_test") { 196 module_out_path = module_output_path 197 include_dirs = [ 198 "${appexecfwk_path}/test/resource/amssystemtestability/abilitySrc/common/", 199 "${appexecfwk_path}/test/systemtest/common/ams/tool/include", 200 "//foundation/distributedschedule/safwk/services/safwk/include", 201 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/include", 202 "//base/notification/ces_standard/test/systemtest/common/resource", 203 "//third_party/jsoncpp/include", 204 ] 205 sources = [ 206 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/event.cpp", 207 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/module_test_dump_util.cpp", 208 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/stoperator.cpp", 209 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/system_test_ability_util.cpp", 210 "acts_ams_kit_want_test.cpp", 211 ] 212 configs = [ 213 "${aafwk_path}/services/abilitymgr:abilityms_config", 214 "${appexecfwk_path}/services/appmgr:appmgr_config", 215 ] 216 cflags = [] 217 if (target_cpu == "arm") { 218 cflags += [ "-DBINDER_IPC_32BIT" ] 219 } 220 deps = [ 221 "${aafwk_path}/interfaces/innerkits/want:want", 222 "${aafwk_path}/services/abilitymgr:abilityms", 223 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base:appexecfwk_base", 224 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core:appexecfwk_core", 225 "${appexecfwk_path}/interfaces/innerkits/libeventhandler:libeventhandler", 226 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 227 "//third_party/googletest:gtest_main", 228 "//third_party/jsoncpp:jsoncpp", 229 "//utils/native/base:utils", 230 ] 231 external_deps = [ 232 "ces_standard:cesfwk_core", 233 "ces_standard:cesfwk_innerkits", 234 "hiviewdfx_hilog_native:libhilog", 235 "ipc:ipc_core", 236 ] 237} 238 239ohos_systemtest("ams_kit_skills_test") { 240 module_out_path = module_output_path 241 include_dirs = [ 242 "${appexecfwk_path}/test/resource/amssystemtestability/abilitySrc/common/", 243 "${appexecfwk_path}/test/systemtest/common/ams/tool/include", 244 "//foundation/distributedschedule/safwk/services/safwk/include", 245 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/include", 246 "//base/notification/ces_standard/test/systemtest/common/resource", 247 "//third_party/jsoncpp/include", 248 ] 249 sources = [ 250 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/event.cpp", 251 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/module_test_dump_util.cpp", 252 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/stoperator.cpp", 253 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/system_test_ability_util.cpp", 254 "acts_ams_kit_skills_test.cpp", 255 ] 256 configs = [ 257 "${aafwk_path}/services/abilitymgr:abilityms_config", 258 "${appexecfwk_path}/services/appmgr:appmgr_config", 259 ] 260 cflags = [] 261 if (target_cpu == "arm") { 262 cflags += [ "-DBINDER_IPC_32BIT" ] 263 } 264 deps = [ 265 "${aafwk_path}/interfaces/innerkits/want:want", 266 "${aafwk_path}/services/abilitymgr:abilityms", 267 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base:appexecfwk_base", 268 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core:appexecfwk_core", 269 "${appexecfwk_path}/interfaces/innerkits/libeventhandler:libeventhandler", 270 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 271 "//third_party/googletest:gtest_main", 272 "//third_party/jsoncpp:jsoncpp", 273 "//utils/native/base:utils", 274 ] 275 external_deps = [ 276 "ces_standard:cesfwk_core", 277 "ces_standard:cesfwk_innerkits", 278 "hiviewdfx_hilog_native:libhilog", 279 "ipc:ipc_core", 280 ] 281} 282 283ohos_systemtest("ams_kit_lifecycle_test") { 284 module_out_path = module_output_path 285 include_dirs = [ 286 "${appexecfwk_path}/test/resource/amssystemtestability/abilitySrc/common/", 287 "${appexecfwk_path}/test/systemtest/common/ams/tool/include", 288 "//foundation/distributedschedule/safwk/services/safwk/include", 289 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/include", 290 "//base/notification/ces_standard/test/systemtest/common/resource", 291 "//third_party/jsoncpp/include", 292 ] 293 sources = [ 294 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/event.cpp", 295 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/module_test_dump_util.cpp", 296 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/stoperator.cpp", 297 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/system_test_ability_util.cpp", 298 "acts_ams_kit_lifecycle_test.cpp", 299 ] 300 configs = [ 301 "${aafwk_path}/services/abilitymgr:abilityms_config", 302 "${appexecfwk_path}/services/appmgr:appmgr_config", 303 ] 304 cflags = [] 305 if (target_cpu == "arm") { 306 cflags += [ "-DBINDER_IPC_32BIT" ] 307 } 308 deps = [ 309 "${aafwk_path}/interfaces/innerkits/want:want", 310 "${aafwk_path}/services/abilitymgr:abilityms", 311 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base:appexecfwk_base", 312 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core:appexecfwk_core", 313 "${appexecfwk_path}/interfaces/innerkits/libeventhandler:libeventhandler", 314 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 315 "//third_party/googletest:gtest_main", 316 "//third_party/jsoncpp:jsoncpp", 317 "//utils/native/base:utils", 318 ] 319 external_deps = [ 320 "ces_standard:cesfwk_core", 321 "ces_standard:cesfwk_innerkits", 322 "hiviewdfx_hilog_native:libhilog", 323 "ipc:ipc_core", 324 ] 325} 326 327ohos_systemtest("ams_kit_processinfo_test") { 328 module_out_path = module_output_path 329 include_dirs = [ 330 "${appexecfwk_path}/test/resource/amssystemtestability/abilitySrc/common/", 331 "${appexecfwk_path}/test/systemtest/common/ams/tool/include", 332 "//foundation/distributedschedule/safwk/services/safwk/include", 333 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/include", 334 "//base/notification/ces_standard/test/systemtest/common/resource", 335 "//third_party/jsoncpp/include", 336 ] 337 sources = [ 338 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/event.cpp", 339 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/module_test_dump_util.cpp", 340 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/stoperator.cpp", 341 "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/system_test_ability_util.cpp", 342 "acts_ams_kit_processinfo_test.cpp", 343 ] 344 configs = [ 345 "${aafwk_path}/services/abilitymgr:abilityms_config", 346 "${appexecfwk_path}/services/appmgr:appmgr_config", 347 ] 348 cflags = [] 349 if (target_cpu == "arm") { 350 cflags += [ "-DBINDER_IPC_32BIT" ] 351 } 352 deps = [ 353 "${aafwk_path}/interfaces/innerkits/want:want", 354 "${aafwk_path}/services/abilitymgr:abilityms", 355 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base:appexecfwk_base", 356 "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core:appexecfwk_core", 357 "${appexecfwk_path}/interfaces/innerkits/libeventhandler:libeventhandler", 358 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 359 "//third_party/googletest:gtest_main", 360 "//third_party/jsoncpp:jsoncpp", 361 "//utils/native/base:utils", 362 ] 363 external_deps = [ 364 "ces_standard:cesfwk_core", 365 "ces_standard:cesfwk_innerkits", 366 "hiviewdfx_hilog_native:libhilog", 367 "ipc:ipc_core", 368 ] 369} 370 371group("systemtest") { 372 testonly = true 373 374 deps = [ 375 ":ams_kit_a_test", 376 ":ams_kit_data_test", 377 ":ams_kit_lifecycle_test", 378 ":ams_kit_processinfo_test", 379 ":ams_kit_service_ability_test", 380 ":ams_kit_skills_test", 381 ":ams_kit_test", 382 ":ams_kit_want_test", 383 ] 384} 385