• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/ohos.gni")
15import("//build/test.gni")
16import("//foundation/ability/ability_runtime/ability_runtime.gni")
17
18ohos_unittest("cj_test_runner_object_test") {
19  module_out_path = "ability_runtime/ability_runtime/cj_test_runner_object_test"
20  include_dirs = [
21    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/app",
22    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context",
23    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/ability_delegator/include",
24    "${ability_runtime_services_path}/common/include",
25    "${ability_runtime_path}/interfaces/kits/native/ability/native",
26    "${ability_runtime_path}/frameworks/native",
27    "${ability_runtime_path}/interfaces/kits/native/appkit/app",
28    "${ability_runtime_path}/interfaces/kits/native/appkit/dfr",
29    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_delegator",
30    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper",
31    "${ability_runtime_path}/cj_environment/interfaces/inner_api",
32  ]
33
34  sources = [
35    "${ability_runtime_path}/frameworks/native/appkit/ability_delegator/runner_runtime/cj_test_runner_object.cpp",
36    "cj_test_runner_object_test.cpp",
37  ]
38  cflags = []
39  if (target_cpu == "arm") {
40    cflags += [ "-DBINDER_IPC_32BIT" ]
41  }
42  deps = [
43    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
44    "${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
45    "${ability_runtime_innerkits_path}/runtime:runtime",
46    "${ability_runtime_native_path}/appkit:app_context",
47    "${ability_runtime_native_path}/appkit:delegator_mgmt",
48  ]
49
50  external_deps = [
51    "ability_base:configuration",
52    "ability_base:want",
53    "bundle_framework:appexecfwk_base",
54    "c_utils:utils",
55    "common_event_service:cesfwk_innerkits",
56    "eventhandler:libeventhandler",
57    "googletest:gmock_main",
58    "googletest:gtest_main",
59    "hilog:libhilog",
60    "ipc:ipc_core",
61    "json:nlohmann_json_static",
62    "napi:ace_napi",
63    "resource_management:global_resmgr",
64  ]
65
66  if (ability_runtime_graphics) {
67    external_deps += [ "window_manager:libwm" ]
68  }
69}
70
71group("unittest") {
72  testonly = true
73  deps = [ ":cj_test_runner_object_test" ]
74}
75