• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024-2025 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/ohos.gni")
15import("//build/test.gni")
16import("//foundation/ability/ability_runtime/ability_runtime.gni")
17
18ohos_unittest("cj_ability_object_test") {
19  module_out_path = "ability_runtime/ability_runtime/cj_ability_object_test"
20  include_dirs = [
21    "${ability_runtime_path}/interfaces/kits/native/ability/native/ability_runtime/",
22    "${ability_runtime_path}/interfaces/kits/native/ability/native",
23    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime",
24    "${ability_runtime_path}/cj_environment/interfaces/inner_api",
25  ]
26
27  sources = [ "cj_ability_object_test.cpp" ]
28
29  cflags = []
30  if (target_cpu == "arm") {
31    cflags += [ "-DBINDER_IPC_32BIT" ]
32  }
33  deps = [
34    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
35    "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
36    "${ability_runtime_innerkits_path}/runtime:runtime",
37    "${ability_runtime_native_path}/ability:ability_context_native",
38    "${ability_runtime_native_path}/ability/native:abilitykit_native",
39    "${ability_runtime_native_path}/ability/native:continuation_ipc",
40    "${ability_runtime_native_path}/ability/native:insight_intent_executor",
41    "${ability_runtime_native_path}/ability/native:uiabilitykit_native",
42    "${ability_runtime_native_path}/appkit:app_context",
43    "${ability_runtime_native_path}/appkit:appkit_delegator",
44    "${ability_runtime_native_path}/insight_intent/insight_intent_context:insightintentcontext",
45    "${ability_runtime_path}/frameworks/cj/ffi:cj_ability_ffi",
46    "${ability_runtime_path}/utils/global/freeze:freeze_util",
47    "${ability_runtime_services_path}/common:event_report",
48  ]
49
50  external_deps = [
51    "ability_base:base",
52    "ability_base:configuration",
53    "ability_base:want",
54    "bundle_framework:appexecfwk_base",
55    "c_utils:utils",
56    "common_event_service:cesfwk_innerkits",
57    "ets_runtime:libark_jsruntime",
58    "eventhandler:libeventhandler",
59    "form_fwk:fmskit_native",
60    "googletest:gmock_main",
61    "googletest:gtest_main",
62    "hilog:libhilog",
63    "hisysevent:libhisysevent",
64    "hitrace:hitrace_meter",
65    "init:libbegetutil",
66    "ipc:ipc_core",
67    "ipc:ipc_napi",
68    "napi:ace_napi",
69    "napi:cj_bind_native",
70    "resource_management:global_resmgr",
71    "window_manager:cj_window_ffi",
72    "window_manager:libwm",
73    "window_manager:libwsutils",
74    "window_manager:windowstage_kit",
75  ]
76
77  defines = [ "CONFIG_HILOG" ]
78}
79
80group("unittest") {
81  testonly = true
82  deps = [ ":cj_ability_object_test" ]
83}
84